Hi Alex, I would like to follow up regarding the text search and highlight feature in the PDF viewer that you reported.After a detailed technical review, we’ve identified that there are inherent limitations in how PDF files are structured and how the browser‑based viewer can interpret them:
- Many PDFs, especially scanned documents, are actually images rather than true text.
- In those cases, the “searchable text layer” embedded inside the PDF does not always match the visible content that users see on the screen (for example, it can be smaller, shifted, or differently aligned).
- The viewer’s search function can only search and highlight within this hidden text layer, not directly on the rendered image of the page.
Because of this mismatch, the viewer sometimes highlights a position that does not visually correspond to the word the user expects on the displayed page. Unfortunately, this is a technical limitation of PDF rendering and text extraction in the browser. There is no reliable way, with the current technology stack, to force the highlight to appear exactly on top of the visible text image for all PDFs, especially scanned ones.To avoid confusion for end users, the only safe option we can provide in this scenario is:
- Keep the search function (if desired) to allow users to know that a term exists in the document; or
- Disable the visual highlight on the page, so that the viewer does not show a misleading highlight in the wrong position.
At this time, implementing fully accurate search and highlight on scanned or image‑based PDFs would require a separate OCR (Optical Character Recognition) processing pipeline and custom coordinate mapping, which is outside the scope of the current viewer and infrastructure.We understand this is not the ideal outcome, but given the technical constraints of the PDF format and browser technology, disabling the highlight is the most transparent and least confusing behavior for your users.If you would like, we can:
- Leave the search box available but without visual highlighting, or
- Completely disable the search feature in the viewer for affected documents.
Please let us know which option you prefer for your environment.Best regards,
Dam