enableViewportRenderMode() functionality

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
|UI version|‘8.7.0’|
|Core version|‘8.7.5’|
|webviewer.min.js|‘8.7.5’|

Detailed description of issue
Is enableViewportRenderMode() integrated into the viewer by default ? although I do see some form of virtualisation in the viewer when viewing large and complex pdfs, however when I tried to log console.log(Core.documentViewer.isInViewportRenderMode()); returned false.

Expected behaviour
console.log(Core.documentViewer.isInViewportRenderMode()); would return true

Does your issue happen with every document, or just one?
All documents

Link to document
Prefer not to disclose

Code snippet

Thanks in advance !

Hello kin.jx

ViewportRenderMode is specifically when the zoom makes the page appear to be “bigger” than the viewport.
If you zoom in then log again, you should see it to be true.

In the image below, the first log is when the page fit within the viewer, the second log is when I zoomed in so the page is “bigger” than the viewport.

Best regards,
Tyler

Hi,
Thank you for the detailed explanation — that really helped clarify things for me.
I had misunderstood the usage a bit, especially since it looks like enableViewportRenderMode() is enabled by default. Appreciate you taking the time to clear that up!

Hello kin.jx,

Glad I could be of assistance.

Best regards,
Tyler