Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.4
-
Fix Version/s: 5.0.6
-
Component/s: None
-
Labels:None
-
Environment:JEE application running on GF 3.1.2.2
-
Support Case References:Support Case #12718 - https://icesoft.my.salesforce.com/5007000000acaJc
Description
We're setting a stream to a org.icepdf.core.pobjects.Document and get single images via Document#getPageImage. The attached PDF with gradients from a powerpoint presentation is rendered incorrect. Gradient areas result in simple black boxes.
Finally cracked this nut. Long story short, I created a new PredictorDecode class that will be added to the stream decode chain. This approach simplifies the process for LZW and Flate encoded data and avoid any nasty buff fill issue when trying to fill a LZW buffer. Refactored the FlateDecode class so that it no longer does the predictor decode and passes the work off to PredictorDecode class.
No that the images are properly decoded there appears to be a tiling issue which is keeping the gradients from being painted at the correct size.