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”,
mode:“no-cors”,
fullAPI: true,
l:""
}, document.getElementById(‘viewer’))
.then(instance => {
const { docViewer, PDFNet } = instance;
instance.setAdminUser(true);
instance.setNoteDateFormat(“YYYY.MM.DD”);
instanceRef = instance;

I need to know which page is currently visible to the user so i am using docViewer.on(‘pageComplete’,(pageIndex,canvas) => {
component.$server.onPageLoaded(pageIndex);
});
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:

instance.CoreControls.SetPreRenderLevel()

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