PdfDocumentProcessor.CreateTiff(String, Int32, IEnumerable<Int32>) Method
Exports a PDF document to a TIFF image using the image’s file path, image’s largest edge length, and page numbers.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v18.2.dll
Declaration
public void CreateTiff(
string fileName,
int largestEdgeLength,
IEnumerable<int> pageNumbers
)
Parameters
Name | Type | Description |
---|---|---|
fileName | String | A String which specifies the file name (including the full path) for the created Tiff image. |
largestEdgeLength | Int32 | An integer value, specifying the length of the image’s largest dimension, in pixels. |
pageNumbers | IEnumerable<Int32> | A list of page numbers which implement the IEnumerable<T><Int32,> interface. |
Remarks
The largestEdgeLength parameter determines the output image height for pages in the portrait orientation and width - for landscape pages.
Note
Azure Compatibility The CreateTiff method works on Azure Windows Virtual Machines and does not work on Azure Web Apps.
Example
The following example shows how to convert pages to a multi-page Tiff image.
Note
Show Me The complete sample project is available at https://github.com/DevExpress-Examples/how-to-export-a-pdf-document-to-multi-page-tiff-and-bitmap
using DevExpress.Pdf;
namespace ExportToTiff {
class Program {
static void Main(string[] args) {
int largestEdgeLength = 1000;
int[] pageNumbers = new int[] { 1, 3, 5 };
// Create a PDF Document Processor.
using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
// Load a document.
processor.LoadDocument("..\\..\\Document.pdf");
// Export pages to a multi-page tiff image.
processor.CreateTiff("..\\..\\Image.tiff", largestEdgeLength, pageNumbers);
}
}
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateTiff(String, Int32, IEnumerable<Int32>) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.