Page manipulations are enabled by default. To disable page manipulations, the pageManipulations parameter must be set to false in the config.js file. This disables the Page Manipulations menu in VirtualViewer HTML5 for Java and enables the Save Annotations menu choice in the File menu.

To disable it, set the pageManipulations parameter to false in the config.js file as shown in the example below:

var pageManipulations = false;

Rotate specific pages

Use the following APIs to rotate specific pages:

  • virtualViewer.rotatePageBy(pageNumber, angle) rotates the current page 0, 90, 180 or 270 (positive or negative) degrees from it’s current state. So, you call this twice with 90 degrees as the parameter, the final image will be rotated by 180. It returns true if the page is rotated successfully. Otherwise, it throws an error.

  • virtualViewer.rotatePageTo(pageNumber, angle) rotates the document 0, 90, 180 or 270 degrees absolutely. Thus, if you call this twice with 90 degrees as the parameter, the final image will only be rotated by 90 degrees only. It returns true if the page is rotated successfully. Otherwise, it throws an error.

Disabling Copy to New Document

The Copy to New Document functionality is enabled by default. To disable it, set the pageManipulationsNewDocumentMenu parameter to false in the config.js file as shown in the example below:

var pageManipulationsNewDocumentMenu = false;