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

Tilman Hausherr commented on PDFBOX-5091:
-----------------------------------------

This is the default renderinghints, so the default is high quality
{code}
private RenderingHints createDefaultRenderingHints(Graphics2D graphics)
{
    RenderingHints r = new RenderingHints(null);
    r.put(RenderingHints.KEY_INTERPOLATION, isBitonal(graphics) ?
            RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR :
            RenderingHints.VALUE_INTERPOLATION_BICUBIC);
    r.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    r.put(RenderingHints.KEY_ANTIALIASING, isBitonal(graphics) ?
                                    RenderingHints.VALUE_ANTIALIAS_OFF :
                                    RenderingHints.VALUE_ANTIALIAS_ON);
    return r;
}
{code}
I was unable to reproduce that it is fast. What exact jdk8 are you using and on 
what OS, and what code are you using?

> Performance issue when saving PDF to image after upgrading from PDFBox 2.0.20 
> to 2.0.21
> ---------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5091
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5091
>             Project: PDFBox
>          Issue Type: Bug
>         Environment: JDK 8 on Windows10
>            Reporter: Volker Ullmann
>            Priority: Minor
>         Attachments: single_page.pdf
>
>
> We use PDFBox to save the first page of a PDF as an image to provide a 
> preview of the document. These PDFs can be relatively complex as they may 
> contain ten thousands of objects, especially map data. The results are still 
> fine, but when we upgraded from 2.0.20 to 2.0.21 we had a notable performance 
> decrease. Saving the first page of the attached sample document now takes 
> nearly 20 sec on my developer machine, compared to 4 sec with 2.0.20.
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to