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.


Why JPedal?

  • Actively developed commercial library with full support and no third party dependencies.
  • Process PDF files up to 3x faster than alternative Java PDF libraries.
  • Simple licensing options and source code access for OEM users.

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download