Please give a brief summary of your issue:
How to hide the particular page in web viewer.
Please describe your issue and provide steps to reproduce it:
I want to hide the page according to user enter page. If user refresh the page, then I want to load the full file.
Please provide a link to a minimal sample where the issue is reproducible:
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To hide particular pages in WebViewer temporarily, you can use JavaScript to manipulate the viewer’s display settings. However, note that this approach only hides the pages visually and doesn’t remove them from the document.
Some things you can try:
Use the loadDocument method with a custom callback to manipulate the pages you want to hide.
Utilize the docViewer.setVisiblePages method to control which pages are visible after document loading.
On page refresh, reload the document using the loadDocument method to ensure all pages are displayed.
Consider using layers or annotations to cover pages if you need a more complex hiding mechanism.
Here are some resources that might help you:
Customizing Viewer Toolbar / Header - Learn how to customize the viewer’s toolbar and controls, which can be useful for adding custom buttons to hide/show pages.
You may need to remove the pages of the document before loading it into WebViewer which simulates the effect of hiding certain pages of a PDF file. You can store user input in an array to specify which pages to remove and if empty, load the document as default.
I want to hide specific pages after the document has loaded. I also want to add a new filter, ‘Show pages with Comments/Annotations’. When the user selects this filter, pages that do not contain any annotations or comments will be hidden.
Unfortunately there is no way to hide/show pages within the Viewer however I would be happy to submit a feature request if this is something important for you.
Alternatively as mentioned, you can remove the specified pages from the document or extract the pages a reload them into the Viewer.