旋转 PDF 页面

您可以使用 PDF Manager 类来旋转 PDF 文档的页面。创建一个 RotateOptions 后,您可以设置所需的页面角度并执行该过程。生成的 PDF 将反映新的尺寸,确保符合特定要求。

Rotate PDF

使用 RotateOptions 类来调整 PDF 文件中页面的方向。

  1. 创建一个 RotateOptions 对象并配置旋转角度。
  2. 添加输入 PDF 文件并指定输出文件位置。
  3. 使用 SetRotation 方法设置旋转角度(例如 90 度)。
  4. 调用 PdfManagerRotate 方法。
 1 // Create RotateOptions object to set instructions
 2 var options = new RotateOptions();
 3 // Set new Rotation
 4 options.Rotation = Rotation.On90;
 5 // Add input file path
 6 options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
 7 // Set output file path
 8 options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
 9 // Perform the process
10 PdfManager.Rotate(options);

关键特性:

  • Rotation:调整 PDF 页面方向。
 中文