PDF 转 TIFF
The Documentize PDF Converter for .NET 是一个强大的工具,旨在将 PDF 文档转换为高质量的 TIFF 图像。该组件确保您的内容能够在各种平台上访问,同时保持出色的保真度和多功能性。您可以通过调整分辨率、启用多页输出或选择特定页面来自定义转换过程。
How to Convert PDF to TIFF
要将 PDF 文档转换为 TIFF 图像,请按照以下步骤操作:
- 创建
PdfToTiffOptions实例以配置转换过程。 - 使用
AddInput方法添加输入 PDF 文件。 - 使用
AddOutput方法指定 TIFF 图像的输出文件路径。 - 运行
Convert方法将 PDF 页面转换为 TIFF 图像。
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryData("path_to_output_directory"));
7// Perform the process
8PdfConverter.Convert(options);Customizing Pages and DPI of PDF to TIFF Conversion
以下示例展示如何将 PDF 的 2 页以 400 DPI 转换为 TIFF 文件:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryData("path_to_output_directory"));
7// Set Pages
8options.PageList = [1, 3];
9// Set result image Resolution
10options.OutputResolution = 400;
11// Perform the process
12PdfConverter.Convert(options);Multi-Page TIFF Creation
该插件支持多页 TIFF 生成,允许您将多个 PDF 页面合并为单个 TIFF 文件,以实现高效的归档或打印。
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryData("path_to_output_directory"));
7// Enable Multi-Page TIFF output
8options.MultiPage = true;
9// Perform the process
10PdfConverter.Convert(options);Customizing Pages and DPI of PDF to TIFF Conversion
以下示例展示如何将 PDF 的 2 页以 400 DPI 转换为 TIFF 文件,并设置压缩和颜色深度:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input file path
4options.AddInput(new FileData("path_to_your_pdf_file.pdf"));
5// Set output Directory path
6options.AddOutput(new DirectoryData("path_to_output_directory"));
7// Set Compression and ColorDepth
8options.Compression = TiffCompression.RLE;
9options.ColorDepth = TiffColorDepth.Format24bpp;
10// Perform the process
11PdfConverter.Convert(options);How to Handle Conversion Results
Convert 方法返回一个 ResultContainer 对象,提供有关转换结果的详细信息。您可以像下面这样获取转换后 TIFF 文件的流:
1// Create PdfToTiffOptions object to set instructions
2var options = new PdfToTiffOptions();
3// Add input File path
4options.AddInput(new FileData("path_to_input.pdf"));
5// Perform the process
6var results = PdfConverter.Convert(options);
7// Get stream results
8foreach (var result in results.ResultCollection)
9{
10 var streamResultPage1 = result.ToStream();
11}Key Features:
- Convert PDF to TIFF:轻松将整个 PDF 文档或特定页面转换为 TIFF 图像。
- Custom Resolution:调整分辨率(例如 300 dpi),以获得更高质量的输出。
- Multi-Page TIFF:将多个 PDF 页面合并为单个多页 TIFF 文件。
- Page set:选择特定页面进行转换。
- Quick Conversion:快速高效的处理过程,几乎无需额外操作。