Scanned page in pdf

Hi , I’m using react framework and I need to check whether the pdf contains scanned page . I checked the textExtractor and elementReader topics but I need some sample code snippet for clarification.

Thanks in advance

Hello wolfpat,

To clarify, you want to be able to tell if a page has highlightable/selectable text?

To determine if the page has selectable text, you could use the Text Extractor API to extract some text from the page.
If you find that you were able to extract text, then you can assume the page has not been scanned in.

Here is a guide on Text Extraction

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.