This quick article contains information on how to convert PDF to TIFF in C#. It provides all the necessary information to configure the environment and detailed steps to accomplish the task. For converting PDF to TIFF C# code is demonstrated along with the customization of the output TIFF image.
Steps to Convert PDF to TIFF in C#
- Configure the project to add Aspose.PDF into the application using Nuget package manager
- Load the sample input PDF file into Document class object for conversion to TIFF image
- Set the resolution of the output TIFF image
- Instantiate and configure the TiffSettings class object to customize the output TIFF image
- Create and configure the TiffDevice object using the specified resolution and other settings
- Save the loaded PDF file as TIFF using the TiffDevice.Process function
The above steps provide link to the necessary libraries required to convert PDF to TIFF using C# and a detailed sequence of steps for proper implementation. You can load the source PDF from disk and simply convert it to TIFF however to demonstrate the customization, the TiffSettings object is configured here. The actual conversion is performed by the TiffDevice object that is initialized with the resolution and TiffSettings instance and contains the Process function to convert PDF to TIFF.
Code to Convert PDF to TIFF using C#
To convert PDF to TIFF C# code is demonstrated where resolution is set for the output TIFF image using the horizontal and vertical resolution values however you can use another overload also. The TiffSettings class contains a lot of properties like skipping the blank pages, setting the compression type, color depth, shape type, brightness, and page coordinate type. The TiffDevice class contains a lot of constructors to initialize its object with different characteristics like resolution, page size, width, height, and TiffSettings instance in multiple combinations.
We have learned how using C# convert PDF to TIFF however if you want to learn other types of conversions like PDF to Word, refer to the article on how to convert PDF to Word using C#.