Change PDF Opening Settings using Java

This tutorial guides on how to change PDF opening settings using Java. It has the details to set the development environment, a list of steps, and a sample code demonstrating how to change PDF viewing preferences using Java. You will get information about various properties that you can set to change the view.

Steps to Change Settings to Open PDF in Adobe using Java

  1. Set the IDE to use Aspose.PDF for Java to set the opening settings
  2. Load the source PDF file into the Document object to change the viewing preferences
  3. Set the preferences as desired while opening the output PDF file
  4. Save the resultant PDF file with new settings

Follow these steps to change setting to open PDF files using Java. Load the source PDF file into the Document class that contains the properties for opening the PDF file. Set the properties such as flag to open the file in the center of the window, direction, display the document title, hide the menu bar, and hide the toolbar.

Code to Change Open PDF Settings using Java

This code demonstrates the process to change settings for opening PDF using Java. You can use numerous enumerators to set the configuration, such as full-screen page mode, page layout, and page mode. The direction shows the order of pages when opened side-by-side, the setHideWindowUI() method hides the elements, such as the scroll bar, and leaves the contents only.

This article has taught us how to change default for opening PDF files. If you want to change the PDF file metadata, refer to the article on how to change PDF metadata using Java.

 English