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

Marek Pribula commented on PDFBOX-4169:
---------------------------------------

Thank you.

Yes, that was exactly my case. I was working with extreme files since in our 
production we have no control over the supplied file and we need to process 
everything (with Xmx1g and sometimes only Xmx640m). So my file had the 
resolution much higher than my printers (again same as printers in production). 
Thanks for the update, looking forward to using it.

> PDFPrintable has subsampling but it can not be used
> ---------------------------------------------------
>
>                 Key: PDFBOX-4169
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4169
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.9
>            Reporter: Marek Pribula
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.10, 3.0.0 PDFBox
>
>
> We are happily using version 2.0.9 with subsampling. During that, I have 
> noticed that memory consumption is unusually high during printing for a 
> particular file. Decompressing and rendering this file was without issues (we 
> have created an instance of PDFRenderer and set subsampling to true). During 
> debugging I notice that in the  PDFPrintable when calling 
> renderer.renderPageToGraphics the renderer has this feature turned off. The 
> reason is very simple. PDFPrintable creates its own PDFRenderer in the 
> constructor and does not set subsampling on / does not allow this feature to 
> be set from outside. I did some test with a modified version of PDFPrintable 
> (setting always subsampling to true in the very same constructor the renderer 
> is instantiated) and it shows significantly better results for memory 
> consumption - in my case it was from OutOfMemory with Xmx1g to no problem 
> with Xmx420m (I did not bother to test with lower Xmx).
>  
> I am not sure if this was the intention but I do not think so since there is 
> at least one if asking about subsampling and with this configuration, it is 
> pointless since it always will be false.



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

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

Reply via email to