This article explains how to change settings for opening PDF using C#. It includes the details to set the development environment, a list of steps, and a sample code to change settings to open PDF in Adobe using C#. The sample code will demonstrate various properties that change PDF opening settings.
Steps to Change PDF Opening Settings using C#
- Set the IDE to use Aspose.PDF for .NET to change open settings
- Load the source PDF file into the Document object to change the opening settings
- Set various properties in the Document class to change PDF viewing preferences
- Save the output PDF file
The above steps describe how to change PDF viewing preferences using C#. Load the source PDF file into the Document class object that contains the properties to change the opening settings. Once you change the properties, save the output file on the disk or to a stream according to the requirements.
Code to Change Setting to Open PDF Files using C#
This sample code demonstrates the process to change how to open PDF using C#. We have set various properties such as direction, which can be R2L or L2R, set the page mode when exiting the full-screen mode, set the page layout, and other UI settings. The default values for CenterWindow are false, the direction is L2R, the flag to display the PDF file name in the title bar is false, and the flag to hide the menu bar is false.
This quick tutorial assists in changing open PDF settings using C#. To change the password of a PDF file, refer to the article on how to change PDF password using C#.