Atalasoft Knowledge Base

FAQ: How Do I Convert Between PDF and TIFF


Note: The PdfDecoder class is part of our PdfReader (Formerly called PdfRasterizer) module, which is an add-on to DotImage. To use this class, you must add Atalasoft.dotImage.PdfReader.dll as a reference to your project, and you will need a license file for this module. You can request an evaluation license file for this module using the Request Evaluation page of our web site. Simply deselect all options and select only "DotImage PDF Reader"

You will also want to add a PdfDecoder to your RegisteredDecoders collection in a static constructor for your class:


static MyClass()
    RegisteredDecoders.Decoders.Add(new PdfDecoder() { Resolution = 200 }); 


Shared Sub New
    RegisteredDecoders.Decoders.Add(New PdfDecoder() With {.Resolution = 200})
End Sub

Also, we have a complete, working PDF to TIFF demo and a complete, working TIFF to PDF Demo available which implement these techniques.

A common task that comes across in the document management world is converting from one file format to another. The two most commonly used formats for digital document images are PDF and TIFF. This task may confuse DotImage developer's because the PDF and TIFF codecs function slightly different from each other. Here I will explain the different approaches to this problem. First, I'll start by explaining the simple case, PDF to TIFF.

There are three possible to save a TIFF file in DotImage; The most memory efficient is demonstrated in the PDF to TIFF demo in our demo gallery. It uses a class called FileSystemImageSource which is passed directly to the PdfEncoder.Save method (along with a stream to save to)


TiffEncoder enc = new TiffEncoder();

using (FileStream fs = new FileStream("pathToSaveTo", FileMode.OpenOrCreate)) 
    using (FileSystemImageSource fsis = new FileSystemImageSource("PathToSourceTiff", true)) 
        enc.Save(fs, fsis, null);


Dim enc As New TiffEncoder()

Using fs As New FileStream("pathToSaveTo", FileMode.OpenOrCreate)
   Using fsis As New FileSystemImageSource("PathToSourceTiff", True)
      enc.Save(fs, fsis, Nothing)
   End Using
End Using

PDF to TIFF sample app

Original Article:
Q10125 - FAQ: How Do I Convert Between PDF and TIFF

Last Modified: 2 Years Ago
Last Modified By: Tananda
Type: FAQ
Rated 1 star based on 9 votes.
Article has been viewed 3.2K times.
Also In This Category