Rotate Pages of PDF

You can to Rotate Pages of PDF documents using the The PDF Manager class. After creating an RotateOptions, you can set a desired page angle and execute the process. The result PDF will reflect the new dimensions, ensuring it fits specific requirements.

Rotate PDF

Use the RotateOptions class to adjust the orientation of pages in a PDF file.

  1. Create a RotateOptions object and configure the rotation angle.
  2. Add the input PDF file and specify the output file location.
  3. Set the rotation angle (e.g., 90 degrees) using the SetRotation method.
  4. Run the Rotate method of PdfManager.
 1// Create RotateOptions object to set instructions
 2var options = new RotateOptions();
 3// Set new Rotation
 4options.Rotation = Rotation.On90;
 5// Add input file path
 6options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
 7// Set output file path
 8options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
 9// Perform the process
10PdfManager.Rotate(options);

Key Features:

  • Rotation: Adjust the orientation of PDF pages.