Please provide instruction for upgrading to later PDF.js versions, if possible.
Have you attempted to upgrade to the latest PDF.js? I swapped in 1.3.88 and 1.2.109 but the promises never seemed to fire. Are there changes that need to be made to PDF.js to make it compatible with this codebase?
Since have lazy rendering in place, we might want to remove canvases and text layers for pages which aren't close to the viewport. This might speed things up with large documents.
Sometimes when scrolling, updating the current page index inside $apply (line 466) reports an error. If I remove the $apply call, then the page isn't always updated!
Thanks for all this work, I am trying-out your pdf-viewer, it is very good btw.
Just a note, I think the file pdf.worker.js is needed when implementing the pdf viewer (my browser was looking for it and the issue was gone when I added it in /js/libs/) while it was not obvious (for me) that I would need it. Maybe a line in the Readme to remember us that we need it would be helpful.
When transpiling in typescript, the 'if' statement:
if (typeof dest === Array)
returns the error:
TS2367: This condition will always return 'false' since the types 'string' and 'ArrayConstructor' have no overlap.
I believe the statement should be changed to
if (dest instanceof Array)
as is done elsewhere in the code.
Some PDFs have text divs without any text. These divs aren't inserted into the DOM by the text layer builder, but the directive is using them when searching. In other words, text div IDs are invalid when highlighting the results.
Example PDF: citygen_gdtw07.pdf (Citygen: An Interactive System for Procedural City Generation)
Search for: "city"