Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.1
-
Fix Version/s: 5.0.7
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:-
-
Salesforce Case Reference:
Description
The PDF renders some lines but then throws:
INFO: ICEsoft ICEpdf Pro 5.0.1
May 17, 2013 8:33:51 PM org.icepdf.core.pobjects.graphics.GraphicsState updateCl
ipCM
FINE: Eror generating clip inverse.
java.awt.geom.NoninvertibleTransformException: Determinant is 0
at java.awt.geom.AffineTransform.createInverse(AffineTransform.java:2688)
at org.icepdf.core.pobjects.graphics.GraphicsState.updateClipCM(GraphicsState.j
ava:600)
at org.icepdf.core.util.content.AbstractContentParser.consume_cm(AbstractConten
tParser.java:445)
at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
at org.icepdf.core.pobjects.Page.init(Page.java:363)
at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageVie
wComponentImpl.java:1008)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
18)
at java.lang.Thread.run(Thread.java:680)
INFO: ICEsoft ICEpdf Pro 5.0.1
May 17, 2013 8:33:51 PM org.icepdf.core.pobjects.graphics.GraphicsState updateCl
ipCM
FINE: Eror generating clip inverse.
java.awt.geom.NoninvertibleTransformException: Determinant is 0
at java.awt.geom.AffineTransform.createInverse(AffineTransform.java:2688)
at org.icepdf.core.pobjects.graphics.GraphicsState.updateClipCM(GraphicsState.j
ava:600)
at org.icepdf.core.util.content.AbstractContentParser.consume_cm(AbstractConten
tParser.java:445)
at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
at org.icepdf.core.pobjects.Page.init(Page.java:363)
at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageVie
wComponentImpl.java:1008)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
18)
at java.lang.Thread.run(Thread.java:680)
The NoninvertibleTransformException stack trace is a little verbose and normally doesn't cause a problem. In this particular case the the pdf is specifying a
{0,0,0,0,0,0}matrix and thus the error report when creating the inverse. The code does however return the Identity transformation when the error is thrown.
The rendering failure occurs because of a missing clip bounds during the painting of the textSprite. I've added a null pointer check to make sure the intersection calculation only occurs on a valid shape. After these changes the PDF is rendering correctly.