Marek Pribula created PDFBOX-4169:
-------------------------------------

             Summary: 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
            Reporter: Marek Pribula


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