Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.

Java PDF to Image conversion tutorial

1 min read

Do you need to convert your PDF files to images in Java? PDF files are not directly supported in Java but you can solve this problem very easily with a third-party Java PDF library.

This tutorial shows you how to convert PDF to Image in Java using our popular JPedal Java PDF library. You can convert a PDF file to a BufferedImage in Java or save it directly to BMP, GIF, HEIC, JPEG, JPEG2000, PNG, TIFF, or WebP.

Java PDF to image conversion (Method 1 – fast and standard quality image)

  1. Download JPedal trial jar.
  2. Create a File handle, InputStream or URL pointing to the PDF file
  3. Include a password if file password protected
  4. Open the PDF file
  5. Iterate over the pages
  6. Close the PDF file

and here is the Java…

Java PDF to image conversion (Method 2 – slower and very high quality image)

  1. Download JPedal trial jar.
  2. Create a File handle, InputStream or URL pointing to the PDF file
  3. Include a password if file password protected
  4. Set conversion options for output defined in JPedalSettings
  5. Open the PDF file
  6. Iterate over the pages
  7. Close the PDF file

and here is the Java…

Related tutorials

If you want to convert a PDF file directly to any of these image formats in Java, check out our related tutorials. Here we document how to



The JPedal PDF library allows you to

Display PDF files in Java Apps
View PDF files in Java
Convert PDF Files to image
Mark Stephens Mark has been working with Java and PDF since 1999 and is a big NetBeans fan. He enjoys speaking at conferences. He has an MA in Medieval History and a passion for reading.