You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Nathan Broadbent (Jira)" <ji...@apache.org> on 2020/07/09 17:28:00 UTC

[jira] [Commented] (PDFBOX-4516) PDFBox text and images are blurry even after rendering with high DPI

    [ https://issues.apache.org/jira/browse/PDFBOX-4516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17154747#comment-17154747 ] 

Nathan Broadbent commented on PDFBOX-4516:
------------------------------------------

Hello, I have recently updated to PDFBox version 2.0.20. I think this change might be causing problems with PDFToImage, because any embedded images in the PDF are now very blurry in the rendered PDF. (It might be related to a different change, but this one seems likely.)

My application has some test cases where I render a PDF as an image and then check for any differences between the generated and expected images. After updating to PDFBox 2.0.20, the PDFToImage command is causing a diff like this:

!image-2020-07-10-01-23-14-017.png|width=453,height=202!

 

Here is the expected image that was generated with the PDFToImage CLI command in an earlier release (I think this was 2.0.19):

 

!image-2020-07-10-01-25-16-775.png|width=558,height=285!

 

PDFToImage from 2.0.20:

!image-2020-07-10-01-25-58-717.png|width=605,height=264! \

 

If you zoom in, you can see that the image quality of the nested cat picture and signature is much worse than in the previous version. (The PDF has not changed.)

Is this a bug, or is there a new option I can use for PDFToImage?

 

> PDFBox text and images are blurry even after rendering with high DPI
> --------------------------------------------------------------------
>
>                 Key: PDFBOX-4516
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4516
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.15, 2.0.19
>         Environment: Oracle Java 8 update125 on both Mac OS X and centos
>            Reporter: Jack
>            Assignee: Tilman Hausherr
>            Priority: Major
>              Labels: interpolation, quality
>             Fix For: 2.0.20, 3.0.0 PDFBox
>
>         Attachments: PDFBOX-4516-59.png, PDFBOX-4516-better-72dpi.jpg, PDFBOX-4516-output-default.png, PDFBOX-4516-output-improved.png, PDFBOX-4516_TvT-better-72dpi.jpg, PDFBOX-4516_TvT.pdf, PDFBOX-4815-dithered-stencil-bad-36dpi.jpg, PDFBOX-4815-dithered-stencil-bad-72dpi.jpg, PDFBOX-4815-dithered-stencil-better-36dpi.jpg, PDFBOX-4815-dithered-stencil-better-72dpi.jpg, PDFBOX-4815-dithered-stencil.pdf, PDFBox4516.java, Screenshot-PDFBOX-1359.pdf-page17.png, defaultDPI.png, highDPI.png, lowDPI.png, original.pdf
>
>
> I tried to render image with different DPI, found PDFBOX performs poorly on the input pdf file, I have to put a very high DPI to get a reasonable good image. Could anyone pls help take a look?  Thanks



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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