# Can we render pages as soon as loaded from the PDF?

**URL:** <https://pdfjs.community/t/can-we-render-pages-as-soon-as-loaded-from-the-pdf/1409>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [February 24, 2022, 6:50pm UTC](https://pdfjs.community/t/can-we-render-pages-as-soon-as-loaded-from-the-pdf/1409 "2022-02-24T18:50:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quamosa](https://avatars.discourse-cdn.com/v4/letter/q/db5fbb/32.png) [@quamosa](https://pdfjs.community/u/quamosa)\
**Post date:** [February 24, 2022, 6:50pm UTC](https://pdfjs.community/t/can-we-render-pages-as-soon-as-loaded-from-the-pdf/1409/1 "2022-02-24T18:50:26Z")

</div>

**Which product are you using?**

PDF.js Express Viewer

**PDF.js Express Version**

UI - 8.2.0  
Core - 8.2.1

**Detailed description of issue**  
When I view the following linearized PDF [https://s3.amazonaws.com/pdftron/downloads/pl/2gb-sample-file.pdf](https://s3.amazonaws.com/pdftron/downloads/pl/2gb-sample-file.pdf) using PDF.js Express Viewer either in my own code or in the online demo [PDF.js Viewer Demo | PDF.js Express](https://pdfjs.express/demo), it takes about 10-20 seconds before the first page is visible even with partial range loading ocurring.

**Expected behaviour**  
{Provide a screenshot or description of the expected behaviour}  
I expect the viewer to begin showing pages as they are loaded. The following URL will show the expected behavior. The first page of this linearized document is visible within 1-2 seconds.

> **[viewer.html](https://mozilla.github.io/pdf.js/web/viewer.html?file=https:%2F%2Fs3.amazonaws.com%2Fpdftron%2Fdownloads%2Fpl%2F2gb-sample-file.pdf)**
>
> 21.94 KB

**Does your issue happen with every document, or just one?**  
This also occurs with a 228 page document (61mb) that I have been testing with.

**Link to document**

> **[2gb-sample-file.pdf](https://s3.amazonaws.com/pdftron/downloads/pl/2gb-sample-file.pdf)**
>
> 1950.48 MB

> **[nutrition-optimized.pdf](https://s3.amazonaws.com/hiitfittv.pdfs/nutrition-optimized.pdf)**
>
> 61.99 MB

**Code snippet**  
No code snippet for the demo.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [February 24, 2022, 6:50pm UTC](https://pdfjs.community/t/can-we-render-pages-as-soon-as-loaded-from-the-pdf/1409/3 "2022-02-24T18:50:30Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Best practices for PDF.js Express - Linearize PDF files](https://pdfjs.express/documentation/learn-more/best-practices#linearize-pdf-files)
- [Core engine for WebViewer - Creating your own UI using WebViewer Core](https://pdfjs.express/documentation/ui-customization/core.8#creating-your-own-ui-using-webviewer-core)
- [Events for PDF.js Express - Document and annotation rendering - DocumentViewer.pageComplete](https://pdfjs.express/documentation/learn-more/events.8#documentviewer.pagecomplete)

APIs:
- [Core.Document - isLinearized()](https://pdfjs.express/api/Core.Document.html#isLinearized__anchor)
- [Utils - setCanvasMultiplier(value)](https://pdfjs.express/api/7.0/utils.html#setCanvasMultiplier__anchor)
- [CoreControls.DocumentViewer - refreshAll()](https://pdfjs.express/api/7.0/CoreControls.DocumentViewer.html#refreshAll__anchor)

Forums:
- [How can we create our custom thumbnail panel beside our viewer?](https://pdfjs.community/t/how-can-we-create-our-custom-thumbnail-panel-beside-our-viewer/811/1)
- [Page transition issues in PDF.js viewer](https://pdfjs.community/t/page-transition-issues-in-pdf-js-viewer/1364/1)
- [I cannot use PDF.JS Express to open a PDF file by url in a Vue Project, please help me figure out how is that happen](https://pdfjs.community/t/i-cannot-use-pdf-js-express-to-open-a-pdf-file-by-url-in-a-vue-project-please-help-me-figure-out-how-is-that-happen/660/1)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [February 24, 2022, 8:56pm UTC](https://pdfjs.community/t/can-we-render-pages-as-soon-as-loaded-from-the-pdf/1409/4 "2022-02-24T20:56:26Z")

</div>

Hey there,

Document loading is handled by the PDF.js library, which we do not support. However I will create an internal ticket to see if there’s anything we can do to speed this up.

Thanks,  
Logan
