How can I call SetPreRenderLevel

WebViewer Version:

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Yes
Is your issue related to annotations?No

Please give a brief summary of your issue:
Need to call SetPreRenderLevel - cannot get access to CoreControls statically

Please describe your issue and provide steps to reproduce it:
I have my own JS file in which we setup WebViewer using standard practice like so:
component.viewer = WebViewer({
path: ‘pdftron/lib’,
initialDoc: file,
filename: “test.pdf”,
fullAPI: true,
}, document.getElementById(‘viewer’))
.then(instance => {
const { docViewer, PDFNet } = instance;
instanceRef = instance;

I need to know which page is currently visible to the user so i am using docViewer.on(‘pageComplete’,(pageIndex,canvas) => {
this is called when a page is loaded which i can work with if I shut down preloading. I need to know how i can get access to Core in javascript to SetPreRenderLevel to 0.

Please provide a link to a minimal sample where the issue is reproducible:

Hello anandchavan,

In version 7.3 you can access the SetPreRenderLevel via:


Best Regards,
Tyler Gordon
Web Development Support Engineer
PDFTron Systems, Inc.