- Copy pqScan.PDFtoImage.jar to your Java project library folder.
- Add pqScan.PDFtoImage.jar to your Java classpath.
How to Convert PDF to Multiple Pages TIFF in Java?
Getting TIF image from PDF pages is a key feature in pqScan Java PDF to Image SDK. Java PDF to Image converter library is completely developed in Java SDK 1.6, and customers can easily integrate the transforming PDF pages to tiff function in their Java application.
In this article, we will show you how to convert PDF to multi-page tiff image. So that you can one TIFF image contains multiple pages, unlike getting single page TIFF from PDF.
Transforming PDF document to a multiple pages tiff, you only need call one method: "toMultiPageTiff". pqScan Java PDF to Image SDK can do all the thing for you: loading PDF document in, analyzing each PDF page, rendering each PDF page, and creating a multiple pages tiff image.
//load the local PDF document public void toMultiPageTiff(String outFileName);
Here is a Java code example, shows how to getting a multi-page tiff from a PDF document, and saves it to the disk.
import com.pqscan.pdftoimage.PDFDocument; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; public class PDFtoTIFFConverter { public static void main(String[] args) { try { // initialise PDFDocument object PDFDocument doc = new PDFDocument(); //load PDF document doc.loadPDF("Sample.pdf"); //converting PDF to a multiple pages tiff doc.toMultiPageTiff("output.tiff"); } catch (Exception e) { e.printStackTrace(); } } }