pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-4527) poor conversion quality on this PDF when dpi is not high enough
Date Fri, 26 Apr 2019 19:29:00 GMT
Jason created PDFBOX-4527:
-----------------------------

             Summary: poor conversion quality on this PDF when dpi is not high enough
                 Key: PDFBOX-4527
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4527
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 2.0.15
         Environment: mac, linux
            Reporter: Jason


I have attached a PDF. We try to convert it to image in PNG format. But the conversion quality
is bad for this particular document. I have attached the conversion result of using 90 dpi
and 400 dpi. The quality is good when dpi is high, e.g. 400. But bad for 90 dpi which normally
generates good conversion quality for us for other documents.

Could you please help us take a look? Thanks!

Some sample code:
{code:java}
private static BufferedImage render(PDDocument pdfPage) throws IOException {
PDFRenderer renderer = new PDFRenderer(pdfPage);
BufferedImage image = renderer.renderImageWithDPI(0, 90, ImageType.RGB); // change dpi to
very high can generate good result
try {
pdfPage.close();
} catch (IOException ignored) {
}
return image;
}
{code}
{color:#000080} {color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message