Convert TIFF/TIF to PDF (.NET Framework/Core)
Both DynamicPDF Converter and DynamicPDF Core Suite support TIFF to PDF conversion - including support for multi-page TIFF to PDF conversion. The following examples illustrate.
Use the TiffFile class from DynamicPDF Core Suite to convert a TIFF to PDF. DynamicPDF Core Suite allows converting single and multi-page TIFF files. Also, DynamicPDF Core Suite allows adding additional page elements to a PDF so you can customize how a TIFF is converted to a PDF. In the following example, we convert a multi-page TIFF to a PDF.
NOTE: Reuse ImageData if adding images individually using the Image class to a PDF. This reuse saves memory and reduces the output PDF size. For more information, please refer to the ImageReuse topic from our help documentation.
Steps to Convert TIFF/Multipage TIFF to PDF using Core Suite
- Create a
TiffFileobject instance and in the constructor pass the path to the TIFF file.
- Create a
Documentobject instance from the TiffFile instance's GetDocument method.
- Call the Document instance's
Drawmethod and pass the path to the PDF to create.
Sample Code - C#
TiffFile tiffFile = new TiffFile("fw9_18.tiff"); Document document = tiffFile.GetDocument(); document.Draw("core-suite-example.pdf");
The following steps and sample code illustrate converting a TIFF to PDF using the DynamicPDF Converter for .NET. As with DynamicPDF Core Suite, multi-page TIFFs are supported by DynamicPDF Converter.
Steps to Convert TIFF to PDF Using Converter for .NET
- Create a new
ImageConverterobject instance and in the constructor pass the path to the TIFF file.
- Invoke the
Convertmethod on the ImageConverter instance and specify the path to the output file.
Sample Code - C#
ImageConverter image = new ImageConverter("fw9_18.tiff"); image.Convert("converter-example.pdf");
NOTE: Use the ImageConverter class if advanced ImageConversionOptions are required. Otherwise, use the static Convert method from the Converter class by passing the path to the source image and path to the output PDF.
DynamicPDF Core Suite is available on NuGet and is part of the
package. The easiest way to install the package is through the Visual Studio Package Manager. You can also download the package directly from NuGet.
DynamicPDF Converter is available on NuGet and is part of the
GitHub Example Project
Clone or view the example project at GitHub.
DynamicPDF Core Suite and DynamicPDF Converter Information
For more information on both products, refer to the DynamicPDF Core Suite webpage or the DynamicPDF Converter webpage.
DynamicPDF Core Suite is available for the Java and COM/ActiveX platforms. Refer to the respective product pages for more details.