ICEpdf
  1. ICEpdf
  2. PDF-1090

iText/ms office dash array format issue. .

    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

      A client has sent in new example of the dash array issue that is causing Java2d a segment fault. We have seen this in the past the case examples have only contains two item dash arrays. The PDF in question has the following definitions:

      0.0 [3.8085938, 76203.805]
      0.0 []
      0.0 [133354.4, 177804.4, 4.445312, 177804.4]
      0.0 [5.714844, 114305.7]
      0.0 [133354.4, 177804.4, 4.445312, 177804.4]
      0.0 [5.714844, 114305.7]

      The probably is related to the 4.4 and 4.7 values. These values appear not to have been scaled to PDF space are causing the segment fault. If the values are multiplied by 1000 we get the correct values. The trick however is how to detect the error when encountered.

        Activity

        Patrick Corless created issue -
        Hide
        Patrick Corless added a comment -

        The new adjustment technique is to do a read a head on the dash array and try and detect a large value change. This could still be error prone but it passes all our corner cases for now. If the read a head detected a need for adjustment then we scale any value less then 10. Seems arbitrary but it's the only pattern we can act on for now.

        Show
        Patrick Corless added a comment - The new adjustment technique is to do a read a head on the dash array and try and detect a large value change. This could still be error prone but it passes all our corner cases for now. If the read a head detected a need for adjustment then we scale any value less then 10. Seems arbitrary but it's the only pattern we can act on for now.
        Hide
        Patrick Corless added a comment -

        Marking as fixed.

        Show
        Patrick Corless added a comment - Marking as fixed.
        Patrick Corless made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49776 Tue Jan 03 12:07:00 MST 2017 patrick.corless PDF-1090 improved detection of malformed dash arrays and adjustment of incorrect values.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49777 Tue Jan 03 12:07:09 MST 2017 patrick.corless PDF-1090 improved detection of malformed dash arrays and adjustment of incorrect values.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.1.0/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Arran Mccullough made changes -
        Support Case References Support Case #13979 - https://icesoft.my.salesforce.com/5007000001gNspT
        Patrick Corless made changes -
        Fix Version/s 6.1.4 [ 13090 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: