Convert TIFF to PDF in Java - TIFF to PDF converter

Convert TIFF to PDF in Java - TIFF to PDF converter

TIFF (Tagged Image File Format) is a widely used format for storing high-quality images that may contain multiple pages, making it suitable for tasks such as scanning and archiving documents. However, there may be instances where you need to convert TIFF images to PDF (Portable Document Format) documents for better compatibility, portability, and ease of sharing. In this article, we will explore how to achieve TIFF to PDF conversion in Java using GroupDocs.Conversion Cloud SDK for Java.

The following topics will be covered in this tutorial:

TIFF to PDF Conversion - API Installation

GroupDocs.Conversion Cloud SDK for Java is a powerful and flexible cloud-based API that allows you to convert various file formats, including TIFF and PDF, with just a few lines of code. It provides a simple and convenient way to integrate document conversion functionality into your Java applications, whether it’s a web application, a mobile app, or a desktop application. The SDK is easy to use and can be integrated into any Java application.

You can either download the API’s JAR file or install it using Maven by adding the following repository and dependency into your project’s pom.xml file:

Maven Repository:

<repository>
    <id>groupdocs-artifact-repository</id>
    <name>GroupDocs Artifact Repository</name>
    <url>https://repository.groupdocs.cloud/repo</url>
</repository>

Maven Dependency:

 <dependency>
    <groupId>com.groupdocs</groupId
    <artifactId>groupdocs-conversion-cloud</artifactId>
    <version>23.4</version>
    <scope>compile</scope>
</dependency>

Now, sign up for an account and collect your Client ID and Client Secret from the dashboard before you start following the steps and available code examples. Please enter the code shown below once you have your ID and secret:

How to Convert TIFF Images to PDF Documents in Java using REST API

Converting TIFF images to PDF documents using GroupDocs.Conversion Cloud SDK for Java is a straightforward process that involves the following steps:

Upload the File

Firstly, upload the TIFF file to the cloud storage using the code snippet as given below:

As a result, the uploaded TIFF file will be available in the files section of your dashboard on the cloud.

Convert TIFF Format to PDF in Java

Following are the steps and sample code snippet to convert a TIFF file to PDF programmatically in Java using the GroupDocs.Conversion Cloud SDK for Java:

  • Firstly, create an instance of ConvertApi class.
  • Secondly, create an instance of the ConvertSettings class.
  • Next, provide the cloud storage name.
  • Set the input TIFF file path and output file format as “pdf”.
  • Now, create an instance of the PdfConvertOptions class.
  • Optionally, provide various convert options like setFromPage, setPagesCount, setMarginTop, setPassword, setCenterWindow, setHeight, etc.
  • After that, set convert options and the output file path using the ConvertSettings instance.
  • Then, create a ConvertDocumentRequest class instance and pass the ConvertSettings parameter.
  • Finally, call the convertDocument() method and pass the ConvertDocumentRequest parameter.

The following code snippet shows how to convert a large TIFF image to a PDF file in Java using REST API:

Download the Converted File

The above code sample will save the converted PDF file to the cloud. You can download it using the following code snippet:

Free Online TIFF to PDF Converter

How to convert TIFF to PDF online for free? Please try an online TIFF to PDF converter to transform a TIFF image into a PDF document. This converter is developed using the above-mentioned TIFF file to PDF REST API.

TIFF to PDF converter

Conclusion

In conclusion, converting TIFF images to PDF documents using GroupDocs.Conversion Cloud SDK for Java is a reliable and efficient process that can be easily implemented in your Java applications. The following is what you have learned from this article:

  • how to programmatically convert TIFF files to PDFs in Java using GroupDocs.Conversion Cloud REST API;
  • programmatically upload the TIFF file to the cloud and then download the converted PDF file from the cloud;
  • and online convert TIFF to PDF using a free TIFF to PDF converter.

Additionally, we also provide an API Reference section that lets you visualize and communicate with our APIs directly through the browser. Java SDK’s complete source code is freely available on Github. Please check the GroupDocs.Conversion Cloud SDK for Java Examples here. Moreover, we encourage you to refer to our Getting Started guide.

Moreover, we suggest you follow our Getting Started guide for detailed steps and API usage.

Finally, we keep writing new blog articles on different file formats and conversions using REST API. So, please get in touch for the latest updates.

Ask a question

For any queries about TIFF to PDF converter, please feel free to contact us on the free support forum.

FAQs

How do I convert TIFF file PDF in Java?

You can convert TIFF images to PDF files using the GroupDocs.Conversion Cloud SDK for Java. The GroupDocs.Conversion Cloud SDK for Java is a powerful tool that allows developers to convert files from one format to another using cloud-based APIs.

How to convert TIFF to PDF online for free?

TIFF to PDF converter allows you to convert TIFF files to PDF format for free. Please follow the step-by-step instructions given below to perform the conversion:

  • Open the free TIFF to PDF converter online.
  • Now, click in the file drop area to upload a TIFF or drag & drop a TIFF file.
  • Next, click on the Convert Now button. Free online TIFF to PDF converter will change the TIFF image to PDF.
  • The download link of the output PDF file will be available after converting the TIFF file.

How to convert TIFF to PDF on Windows?

Please visit this link to download an offline TIFF to PDF converter for Windows. This TIFF file to PDF document converter can be used to convert TIFF images to PDF files on Windows easily, with a single click.

Can GroupDocs.Conversion Cloud SDK for Java convert other file formats besides TIFF to PDF?

Yes, GroupDocs.Conversion Cloud SDK for Java supports conversion between various document and image formats, including PDF, DOCX, XLSX, PPTX, JPG, PNG, BMP, and many more.

See Also

If you want to learn about related topics we recommend you visit the following articles: