PdfDocumentProcessor.CreateTiff(String, Int32, IEnumerable<Int32>) Method
Exports PDF pages to a multi-page TIFF image and saves the image to a file.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v24.2.dll
NuGet Package: DevExpress.Document.Processor
#Declaration
public void CreateTiff(
string fileName,
int largestEdgeLength,
IEnumerable<int> pageNumbers
)
#Parameters
Name | Type | Description |
---|---|---|
file |
String | A file name (including the full path) for the created TIFF image. |
largest |
Int32 | A length of the image’s largest dimension, in pixels. |
page |
IEnumerable<Int32> | A list of page numbers. |
#Remarks
The largestEdgeLength
parameter determines the output image height for pages with the portrait orientation and width - for landscape pages.
Warning
The Create
method is not available in .NET MAUI applications. An exception is thrown on an attempt to call this method.
The following example shows how to convert pages to a multi-page TIFF image.
using DevExpress.Pdf;
static void Main(string[] args)
{
int largestEdgeLength = 1000;
int[] pageNumbers = new int[] { 1, 3, 5 };
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.