pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Jackson <leonjacko...@gmail.com>
Subject Producing PNG of Ghent Workgroup test PDFs
Date Fri, 17 Nov 2017 14:09:32 GMT
Hi,

I'm trying to produce PNGs of PDF pages in my application, and a
requirement is that the solution can successfully handle the Ghent
workgroup test PDFs. I'm using PDF Box 2.0.8 and it results are not looking
good.

I'm using the code below to generate the PNGs









PDDocument pdDocument = PDDocument.load(new
File("Ghent_PDF_Output_Suite_V50/Ghent_PDF-Output-Test-V50_ALL_X4.pdf"));
PDFRenderer renderer = new PDFRenderer(pdDocument);
BufferedImage image = renderer.renderImageWithDPI(0, 300, ImageType.RGB);
if (!ImageIO.write(image, "PNG", new FileOutputStream("temp/test.png"))) {
    throw new Exception("Failed to write image '" + image + "'");
}

Does anyone know if it's possible to get PdfBox to handle these PDFs
properly?

Thanks,
Leon

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