jPDFImages Source Code Samples
Following are a number of Java samples that use jPDFImages to convert PDF files to images.
PDFToTIFF.java – A program to convert a PDF file to a single, multi-page TIFF file.
PDFToJPEGs.java – A program to convert a PDF file to a serier of JPEG files.
PDFToBufferedImages.java – A program to convert pages of a PDF to java BufferedImage objects.
PDFToColorSpaceImages.java – A program that converts pages to images in a specific color space, here the gray color space shipped with Java but typically customers would want to use their own printer color space.
TIFFToPDF.java – A program that converts a TIFF file into a PDF document.
Watermark.java – A program that shows how to get images from a PDF as Java BufferedImage objects, which can then be modified to add a watermark before saving.
PDFImagesCLI.java – A command line program that takes a number of parameters, such as the output format (TIFF, JPEG, PNG), output DPI and others, and converts the PDF file to images.
If you are looking for sample source code for a function that you don’t see here, please let us know at email@example.com and we can see if we have some available internally or if we can produce it for you.