[Feature Request] Highlight search terms inside the PDF viewer #13063
Unanswered
ripper0002
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
When searching for documents, Paperless-ngx correctly returns matching documents and displays highlighted search snippets. However, after opening a document, it can be difficult to locate the actual occurrence of the search term within long PDFs or OCR-generated documents.
Users often have to manually search the document again or scroll through multiple pages to find the relevant text.
Proposed solution
Highlight all search terms directly inside the integrated PDF viewer when a document is opened from the search results.
Ideally this would include:
Automatically highlight all matches in the document.
Jump to the first match when the document opens.
Navigation controls for Next and Previous match.
Display the total number of matches (e.g. "3 of 12").
Preserve the current behavior when a document is opened without an active search.
Benefits
Much faster navigation in long documents.
Better usability for OCR-heavy archives.
Reduces the need to manually search within the PDF after opening it.
Aligns the user experience with PDF readers such as Adobe Acrobat, Firefox PDF.js, and many document management systems.
Possible implementation
Since Paperless-ngx already knows the active search query and uses PDF.js for document viewing, the search term(s) could be passed to the PDF viewer and the existing text-search/highlighting functionality of PDF.js could be leveraged, if technically feasible.
Use case
For example, I search for "invoice 12345". Paperless-ngx finds the correct document and shows a highlighted search snippet. After opening the PDF, I would expect the viewer to automatically jump to and highlight "invoice 12345", allowing me to immediately verify the relevant section without performing another search.
Other
No response
All reactions