officefileapi-120343-pdf-document-api-examples-export-a-pdf-document-to-an-image-how-to-export-a-pdf-document-to-a-multi-page-tiff.md
Important
You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use these examples in production code.
Follow the steps below to export pages to a multi-page Tiff image.:
largestEdgeLength parameter determines the images’ height for pages in the portrait orientation and width for landscape pages.Warning
The CreateTiff method is not available in .NET MAUI applications. An exception is thrown on an attempt to call this method.
using DevExpress.Pdf;
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);
// Export pages to a multi-page tiff image with specified resolution.
// processor.CreateTiff("..\\..\\Image.tiff", pageNumbers, 96);
}
Imports DevExpress.Pdf
Dim largestEdgeLength As Integer = 1000
Dim pageNumbers As Integer() = New Integer() {1, 3, 5}
Using processor As PdfDocumentProcessor = New PdfDocumentProcessor()
processor.LoadDocument("..\..\Document.pdf")
processor.CreateTiff("..\..\Image.tiff", largestEdgeLength, pageNumbers)
' Export pages to a multi-page tiff image with specified resolution.
' processor.CreateTiff("..\\..\\Image.tiff", pageNumbers, 96)
End Using
Note
Set the PdfDocumentProcessor.RenderingEngine property to Skia to enable export on Azure Web Apps.