Link
Skip to main content

How to convert PDF pages to compressed TIFF files?

You can do this with the following example code in Java.

ConvertPagesToImages convert = new ConvertPagesToImages("inputFile.pdf");
try {
    for (int page = 1; page <= convert.getPageCount(); page++) {
        BufferedImage bi = convert.getPageAsImage(page);
        TiffEncoder tiffEncoder = new TiffEncoder();
        tiffEncoder.setCompressed(true);
        tiffEncoder.write(bi, new FileOutputStream(new File("outputFile.pdf")));
    }
} catch (PdfException | IOException e) {
    e.printStackTrace();
}

You can find out more about the PDF to Image conversion here.


Get started with JPedal in 3 steps

  1. Fill in the form to download the trial jar →
  2. Copy the code snippets as instructed on the next page
  3. Build your solution using our docs

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download