Detailed description of issue
When I load a document like the one included, and I search for the term at-home administration it doesn’t appear to find the results.
However if I open the pages panel and scroll all the way to the last page, then hit search again it finds them.
Expected behaviour
The search feature should find the results like so:
Can you please share the code you’re using to search the document? And also the code you are using to load PDF.js Express. My suspicion is that there is a timing error and the document isn’t fully loaded before you search.
Hey Logan, so I am just using the search field in the sidebar to do the search not running any commands to manually do it. Does the document work for you when you test it?
Here’s the code I am running to load it:
WebViewer({
path: ‘…/…/Content/pdfexpress’, // path to the PDF.js Express’lib’ folder on your server
licenseKey: ‘Insert commercial license key here after purchase’,
initialDoc: ‘/Content/FlowPaper/services/awsview.ashx?doc=’ + filePath + ‘&format=pdf&page={page}&aws=’ + awsName,
disableFlattenedAnnotations: true,
annotationUser: authorName,
disabledElements: [
‘toolbarGroup-Shapes’,
‘toolbarGroup-Insert’,
‘unpostedCommentIndicator’,
‘noteState’,
‘eraserToolButton’,
‘toolsOverlay’
]
})
I can reproduce your issue with that document. It is a pretty big document so my suspicion is that we’re not loading all of the pages while searching. I’ll look into it.
This was a tricky one but we found a fix. As a side effect, we were also able to make search about 50% faster on long documents! This fix will be pushed with the next release.
Hey @Logan everything is looking good and working better. However I still have a search issue related to not finding certain terms in a document.
PDF.js Express Version
8.0.1
Detailed description of issue
When I try searching the term home administration I am unable to find it even though it exists in many places in the document.
Expected behaviour
It should find all search terms.
Does your issue happen with every document, or just one?
I tested in multiple documents.