Skip to main content

PdfDocumentProcessor.CreateTiff(Stream, Int32) Method

Exports a PDF file to a multi-page TIFF image and writes the image to a stream.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v23.2.dll

NuGet Package: DevExpress.Document.Processor

Declaration

public void CreateTiff(
    Stream stream,
    int largestEdgeLength
)

Parameters

Name Type Description
stream Stream

A stream to which a TIFF image should be written.

largestEdgeLength Int32

A length of the image’s largest dimension, in pixels.

Remarks

The largestEdgeLength parameter determines the output image 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.

The following example shows how to convert pages to a multi-page TIFF image.

using DevExpress.Pdf;
using System.IO;

static void Main(string[] args)
{
  using (var processor = new PdfDocumentProcessor())
  {
    // Load a document. 
    processor.LoadDocument("..\\..\\Document.pdf");
    using (var stream = new FileStream("..\\..\\Image.tiff", FileMode.CreateNew, FileAccess.Write))
    {
      // Export pages to a multi-page TIFF image.
      processor.CreateTiff(stream);
    }
  }
}
See Also