pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Hirsh <joelehi...@gmail.com>
Subject Saving images of PDF pages in version
Date Wed, 26 Aug 2015 16:42:11 GMT
I am trying to use PDFBox 2 to save images of PDF pages.  If I have a
scanned document or a PDF that was created with images, everything works
fine.

However, if I have scanned document that had OCR done to it, then I get
blank images. Even if I delete the OCR text that overlays the image (using
NitroPDF), still nothing.  If I have Acrobat print the file to an image,
then as expected, its OK again.

To create the image I am looping through the pages with

            PDPageTree pages = document.getDocumentCatalog().getPages();
            Iterator<PDPage> iter = pages.iterator();

and then using

             BufferedImage pageimage = new PDFRenderer(
document).renderImageWithDPI(i, 300.0f);


Am I doing something wrong or is there something else I should be doing?
Or is this a bug?

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message