ICEpdf
  1. ICEpdf
  2. PDF-1089

xForm transparency buffer out of memory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.3
    • Fix Version/s: 6.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The PDF in question has some very large xform boxes which are content parser tries to render to a buffer for transparency effects. We have code that tries to detect very large buffers but it is failing in this case.

      Once the image bounds are tightened up the PDF renders fine.

        Activity

        Hide
        Patrick Corless added a comment -

        There were some code inconsistencies for the values that define the maximum buffer size that can be created. The code was setup with a Max_int value for creating the AbstractContentParser which was added for a few corner case encoders and then a second size check was made in the FormDrawCmd command just before the buffer was created.

        The code has been update to use the FormDrawCmd.MAX_IMAGE_SIZE for the FormDrawCmd and AbstractContentParser checks. In general we don't want to go the route of creating an instance of FormDrawCmd if the supporting image is going to be very large. PDF renders fine now and uses significantly less memory to render.

        Show
        Patrick Corless added a comment - There were some code inconsistencies for the values that define the maximum buffer size that can be created. The code was setup with a Max_int value for creating the AbstractContentParser which was added for a few corner case encoders and then a second size check was made in the FormDrawCmd command just before the buffer was created. The code has been update to use the FormDrawCmd.MAX_IMAGE_SIZE for the FormDrawCmd and AbstractContentParser checks. In general we don't want to go the route of creating an instance of FormDrawCmd if the supporting image is going to be very large. PDF renders fine now and uses significantly less memory to render.
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: