PDF (Portable Document Format) and TIFF (Tagged Image File Format) are two popular file formats for storing and sharing documents. PDF is widely used because of its compatibility with different devices and operating systems, while TIFF file is preferred for storing high-quality images. Sometimes, you may need to convert a PDF file to a TIFF file for various reasons, such as archiving or printing. In this article, we will discuss how to convert PDF to TIFF file programmatically in Java using GroupDocs.Conversion Cloud SDK for Java.
The following topics will be covered in this tutorial:
- Java PDF to TIFF File Converter API and SDK Installation
- How to Convert PDF to TIFF Image in Java using REST API
Java PDF to TIFF File Converter API and SDK Installation
GroupDocs.Conversion Cloud SDK for Java is a cloud-based file format document conversion API that allows you to convert your files and images to different formats using simple API calls. It supports more than 50 file formats, including Visio, PDF, Word, Excel, PowerPoint, raster images, and many more. Using GroupDocs.Conversion Cloud SDK for Java, you can efficiently convert your files and images to the format you need without using any third-party software. Integrating the API into Java-based applications is made simple and efficient, eliminating the need for additional software.
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:
<repository> <id>groupdocs-artifact-repository</id> <name>GroupDocs Artifact Repository</name> <url>https://repository.groupdocs.cloud/repo</url> </repository>
<dependency> <groupId>com.groupdocs</groupId <artifactId>groupdocs-conversion-cloud</artifactId> <version>23.4</version> <scope>compile</scope> </dependency>
After integrating the Cloud SDK into your Java application, sign up for an account. 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 PDF to TIFF Image in Java using REST API
To convert a PDF file to a TIFF file using GroupDocs.Conversion Cloud SDK for Java, follow these steps:
Upload the File
Firstly, upload the PDF document to the cloud storage using the code snippet as given below:
As a result, the uploaded PDF file will be available in the files section of your dashboard on the cloud.
Convert PDF to TIFF Format in Java
Here are the steps and sample code snippet to convert a PDF file to a TIFF file 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 PDF file path and output file format as “tiff”.
- Then, create an instance of the TiffConvertOptions class.
- Optionally, set various convert options like setFromPage, setPagesCount, etc.
- Now, set convert options and the output file path using the ConvertSettings instance.
- After that, create ConvertDocumentRequest class instance and pass the ConvertSettings parameter.
- Finally, call the convert_document() method and pass the ConvertDocumentRequest parameter.
The following code snippet shows how to convert a PDF file to Tiff in Java using REST API:
Download the Converted File
The above code sample will save the converted TIFF file to the cloud. You can download it using the following code snippet:
Free Online PDF to TIFF Converter
How to convert PDF to TIFF images online for free? Please try an online PDF to TIFF converter to change a PDF to TIFF image. This converter is developed using the above-mentioned PDF to TIFF image REST API.
This brings us to the end of this blog post. The following is what you have learned from this article:
- how to programmatically convert PDFs to TIFF files in Java using GroupDocs.Conversion Cloud REST API;
- programmatically upload the PDF file to the cloud and then download the converted TIFF file from the cloud;
- and online convert PDF to TIFF using a free PDF to TIFF 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 PDF to TIFF converter, please feel free to contact us on the free support forum.
How do I convert PDF files to TIFF format using Java?
You can convert PDF files to TIFF format 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 PDF to TIFF online for free?
Our PDF to TIFF converter allows you to convert PDF to TIFF format for free. Please follow the step-by-step instructions given below to perform the conversion:
- Open the free PDF to TIFF converter online.
- Now, click in the file drop area to upload a PDF or drag & drop a PDF file.
- Next, click on the Convert Now button. Free online PDF to TIFF converter will change PDF to TIFF image.
- The download link of the output TIFF image will be available after converting the PDF file.
How to convert PDF to TIFF on Windows?
Please visit this link to download an offline PDF to TIFF converter for Windows. This PDF to TIFF image converter can be used to convert PDF files to TIFF images on Windows easily, with a single click.
How do I install the GroupDocs.Conversion Cloud SDK for Java?
You can install the GroupDocs.Conversion Cloud SDK for Java by adding the appropriate dependencies to your Java project.
If you want to learn about related topics we recommend you visit the following articles:
- Convert Markdown Files to PDF in Java using REST API
- Convert EXCEL to JSON and JSON to EXCEL in Python
- How to Convert CSV to JSON and JSON to CSV in Python
- Convert Word Documents to PDF using REST API in Python
- How to Convert PDF to Excel in Python using REST API
- Convert PDF to Editable Word Document with Python SDK
- How to Convert PDF to PPTX using a REST API in Python
- Convert PDF File to PNG and PNG to PDF Format using Java
- How to Convert PowerPoint PPT PPTX to HTML using Java
- How to Convert Visio File to PDF in Java