ICEpdf
  1. ICEpdf
  2. PDF-363

Type 4 function parsing error and colour output error

    Details

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

      Description

      The PDF in question PG_2011_AnnualReport.pdf, contains several pages with a blue gradient. There is a parsing error when handling the type 4 function used to get the gradient colours. Further work is needed to see if there are others that are causing the colour issues.

        Activity

        Patrick Corless created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26920 Fri Dec 16 08:10:10 MST 2011 patrick.corless PDF-363 fixed two issue with the type 4 function lexer, handling of copy and if operations.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/LexerText.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/OperatorFactory.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/Lexer.java
        Hide
        Patrick Corless added a comment -

        This took a bit to track down, the first issue was with the copy operator not correctly indexing the copy as well as a class cast exception. Once corrected, the function generated values resulted in a colour gradient that was the wrong colour, red instead of blue.

        The colour issue was the result of an error in how we handled the "if" operator which should evaluate an expression {} of operands if true is fond on the stack. We correctly manipulated the stack but failed to execute the operands pushed back on the stack. So I tweaked the lexer to peek at the top of the stack to see if a operand needed to be executed.

        Show
        Patrick Corless added a comment - This took a bit to track down, the first issue was with the copy operator not correctly indexing the copy as well as a class cast exception. Once corrected, the function generated values resulted in a colour gradient that was the wrong colour, red instead of blue. The colour issue was the result of an error in how we handled the "if" operator which should evaluate an expression {} of operands if true is fond on the stack. We correctly manipulated the stack but failed to execute the operands pushed back on the stack. So I tweaked the lexer to peek at the top of the stack to see if a operand needed to be executed.
        Hide
        Patrick Corless added a comment -

        Closing, no issues have been reported by QA or the client.

        Show
        Patrick Corless added a comment - Closing, no issues have been reported by QA or the client.
        Patrick Corless made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: