Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
8.1.1 or PDF.js Viewer Demo | PDF.js Express
Detailed description of issue
We have a series of PDFs which - when viewed using
@pdftron/pdfjs-express-viewer - when the “documentLoaded” event occurs, render first as blank pages, then slowly each page is rendered, possibly when the user scrolls the page into view. In our implementation, as pages scroll out of view, they appear to return to blank state and then appear to render when returned into view.
I reviewed this forum for similar questions, and didn’t find many.
I followed this guide: How to Optimize PDFs for Accurate Rendering in PDF.js | PDF.js Express and tried (a) flattening and (b) PDF/A which (other than increasing the file sizes) made no difference to this behaviour.
The PDF I’m using is only 6 pages long (1.2MB).
I also threw together a minimal pdf.js implementation, and I think it displays the same issue: nickm-pdf-viewer-test - CodeSandbox
The PDF renders fully when loaded, and is kept in memory, rather than having pages unloaded as the user scrolls.
Does your issue happen with every document, or just one?
A subset of documents
Link to document
I’d like to understand what it is about these PDFs that is causing this behaviour (I’m fairly certain it’s the PDF) although if there are things I can change about our pdf.js express implementation that will improve matters, I’d love to hear about them please.