Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4169

PDFPrintable has subsampling but it can not be used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.0.10, 3.0.0 PDFBox
    • Component/s: Rendering
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                marekpribula Marek Pribula
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: