Once a PDF file is loaded in your JPDFNotesBean component, anything you do to the any of the pages will activate the save dialog window in case your code will close the PDF file. Say you want to save the modified actions of the PDF file in the database and you want the PDF pages’ display to stay as is and the display changes will take effect through calling your code, you can nullify the save dialog popup from appearing by calling the setModified() method before loading the file.

That way, if an existing file is currently loaded, the setModified() method will treat the currently existing file as having never been modified which can then load the next PDF file without ever prompting the save dialog popup to appear.

JPDFNotes is a Java bean that can be embedded in Java applications and applets to deliver PDF content to your users and allow them to add notes and comments and then save the annotated document.

The JPDFNotes API has a feature that will let you rotate a single page of the PDF file while not affecting the rest. This is through the getMutableDocument().setPageRotation() method of the JPDFNotesBean class. The rotation values can either be 0, 90, 180 or 270.

The sample code below rotates page 6 with an angle of 90 degrees.

Related Posts Plugin for WordPress, Blogger...