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.
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.