How to Convert TIFF to PDF in Java

This short topic entails how to convert TIFF to PDF in Java. It provides details about configuring the environment and the necessary steps to accomplish the task. For converting TIFF to PDF Java code is used and you can use the application on any of Java supported platform including Windows, Linux and macOS.

Steps to Convert TIFF to PDF using Java

  1. Configure the project by adding the Aspose.Imaging library from the Maven Repository to convert TIFF to PDF
  2. Import the Aspose.Imaging namespace to use API features in the project
  3. Load the source TIFF Image using the load method exposed by the Image class
  4. Initialize the PdfOptions instance to set the resolution and other settings
  5. Save the output PDF on the disk using the save method

By using the above steps in Java TIFF to PDF converting application is developed using a simple API interface where we load the source TIFF from the disk and simply convert it to the PDF. We customize the output PDF with the help of PdfOptions object that allows setting the resolution values for the TIFF image inside the PDF. The generated PDF is saved on the disk using the save method.

Code to Convert TIFF to PDF in Java

To convert TIFF to PDF Java code is used where we have set the resolution for the output PDF file using the horizontal and vertical resolution values. You can customize the PDF by using other properties exposed by the PdfOptions class including MultiPageOptions, PageSize and PDFCoreOption like Compliance, Compression and JpegQuality settings.

We have witnessed how with the help of Java convert TIFF to PDF is easily possible in a few lines of code. If you want to learn about creating animated GIF images, refer to the article on how to create animated GIF in Java.

 English