How to Use Tiff for .NET

The Tiff class in Aspose.Pdf.LowCode namespace provides a simplified API for converting PDF documents to TIFF images in .NET applications.

Key Features

  1. Convert a multi-page PDF into a single multi-frame TIFF, using TiffOptions.SaveAsMultiPageTiff.
  2. Choose from five compression types – None, RLE, LZW, CCITT3, and CCITT4 – via Compression.
  3. Control output DPI and convert only a specific page range, via OutputResolution and PageList.
  4. Process input and output as in-memory streams, using StreamDataSource.

Use Cases

  • Archive a multi-page PDF as a single TIFF image file for systems that expect TIFF rather than PDF.
  • Produce a fax- or scan-compatible TIFF by choosing CCITT3 or CCITT4 compression with Format1bpp depth.
  • Convert only a specific page range of a large PDF to TIFF using PageList, instead of the whole document.

Setup and Licensing

Apply metered licensing before any conversion:

using Aspose.Pdf;

Metered metered = new Metered();
metered.SetMeteredKey("publicKey", "privateKey");

Articles

Prerequisites

  • Aspose.PDF for .NET (version 26.10.0 or later)
  • Valid Aspose Metered API key

Basic Usage

using System.Linq;
using Aspose.Pdf.LowCode;

var tiff = new Tiff();
var options = new TiffOptions { SaveAsMultiPageTiff = true };
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("tiff-output"));
var result = tiff.Process(options);
tiff.Dispose();
string outputPath = result.ResultCollection.First().ToFile();

Advanced Usage with Options

using System.Linq;
using Aspose.Pdf.LowCode;
using Aspose.Pdf.Devices;

var tiff = new Tiff();
var options = new TiffOptions
{
    SaveAsMultiPageTiff = true,
    Compression = CompressionType.LZW,
    OutputResolution = 300,
};
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("tiff-output"));
var result = tiff.Process(options);
tiff.Dispose();
string outputPath = result.ResultCollection.First().ToFile();

See Also