Details
-
Type: Bug
-
Status: Closed
-
Priority: 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 | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/LexerText.java
MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/OperatorFactory.java MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/functions/postscript/Lexer.java |
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 ] |
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.