'PDFJS Callbacks for text content loaded
We've been browsing PDFJS's documentation looking for event callbacks for when the document has finished loading all of its text and is ready for searching. We have a search that searches a PDFJS document for any given text, when you try to perform a search as soon as the page loads, when there are plenty of documents to be loaded, we get different search results and it looks like its because PDFJS is still loading the background text information we're searching through. We found that there's an event callback for onPageRendered, which we use so users can't search before the pagerendered callback is hit, and that's enough to make the user wait til the rendering of the PDF is finished to display the user search panel. However, it seems there's still background text loading happening after the pagerendered event completes, and we can't find another event to bind a callback for when its text content has finished loading. Does anyone know how we can handle this issue?
This is the event we're currently using:
eventBus.on(
'pagerendered',
_.debounce(() => {
}, 1000, {trailing: true})
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
