PDF 页面大小调整
你可以使用 PDF Manager 类来调整 PDF 文档的页面大小。创建 ResizeOptions 后,设置所需的页面尺寸并执行调整过程。结果 PDF 将反映新的尺寸,确保符合特定要求。
调整 PDF
要调整 PDF 文档的页面大小,使用 ResizeOptions 类来指定文档的新页面尺寸。
- 创建一个 ResizeOptions 对象以定义页面大小。
- 添加输入文件并设置期望的输出位置。
- 使用 SetPageSize 方法指定新尺寸(例如 A4)。
- 调用
PdfManager的Resize方法。
1// Create ResizeOptions object to set instructions
2var options = new ResizeOptions();
3// Set new PageSize
4options.PageSize = PageSize.A3;
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.Resize(options);关键特性:
- Resizing: 将页面调整为特定尺寸(例如 A4、Letter)。