I’m using pdf.js-express 8.7.0. We use too much search and I founded out a behavior always I search.
When I search “energia” in my PDF opened with PDF.JS Express, it returns correct search and brought me first ocurrence.
After, somethimes I clear fieldtext and search again by “energia” in the same work, it doesn’t return the same result, doesn’t brought me first ocurrence. See image below:
Does the search result show the same number of occurrence?
Does this issue happen for only a specific file? If so, can you share a file that reproduces the issue?
I was unable to reproduce on the demo site (8.7): PDF.js Viewer Demo | PDF.js Express
Do you have any custom code for the search functionality?
Thank you in advance.
Best regards,
Kevin Kim
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
When I uploaded the document on our latest package (8.7) I was unable to reproduce the issue.
Video attached: 40760.mov
However there were some console errors from this pdf. Does this happen with any other pdf without issues?
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
I was able to reproduce it by removing the last letter before the search completes (spinning wheel). When the search was in progress, if you open the console there are the above mentioned warnings, and if we wait for it to complete, the search seems less to error out less.
We’ve added the issue to our backlog to be worked on in the future. We don’t have a timeline for when it will be fixed but if it does get fixed we’ll let you know when it’s available in an experimental build to test out and the estimated official release date. If you have a desired timeline for having this issue fixed please let us know and we’ll do our best to work with you on how this can fit into the release schedule.
Best regards,
Kevin Kim
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here
Hello Kim, thank you very much for your attention.
I believe the problem is not the alerts in the console. During the tests, I analyzed that when we wait for the search to complete and we redo the test by deleting the last letter, the error does not happen; that is, the error only occurs when the search is carried out when there is already a search in the process.
Were you able to try out the build above if that fixes the issue?
After the first load of the pdf, the first search seems to trigger console warnings. A temporary workaround would be to add a searchListener for when the search completes: https://pdfjs.express/api/UI.html#.searchListener__anchor
Best regards,
Kevin Kim
Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here