Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Java PDF to Image Conversion using PDFBox

Here are few snippets of code that you can use to convert a PDF file to images eg: tiff, png, multi-page tiff. It uses a open source library PDFBox version 3

The Apache PDFBox® library is an open source Java tool for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

PDFBox comes with following features:

  • Extract Unicode text from PDF files.
  • Split a single PDF into many files or merge multiple PDF files.
  • Extract data from PDF forms or fill a PDF form.
  • Validate PDF files against the PDF/A-1b standard.
  • Print a PDF file using the standard Java printing API.
  • Save PDFs as image files, such as PNG or JPEG.
  • Create a PDF from scratch, with embedded fonts and images.

Convert PDF to PNG/JPG/BMP etc: