Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.2
-
Fix Version/s: 4.2.2
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:-
Description
The attached test file´s embedded fonts do not render. The PDF file was created with GS 9 (PdfCreator 1.2.0). Here is the exception:
FINE: Error getting ICCBased colour
java.awt.color.ProfileDataException: Invalid profile sequence
at sun.awt.color.ICC_Transform.<init>(ICC_Transform.java:103)
at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:148)
at org.icepdf.core.pobjects.graphics.ICCBased.getColor(ICCBased.java:178)
at org.icepdf.core.util.ContentParser.consume_SC(ContentParser.java:1797)
at org.icepdf.core.util.ContentParser.parse(ContentParser.java:661)
at org.icepdf.core.pobjects.Page.init(Page.java:390)
at org.icepdf.core.views.swing.PageViewComponentImpl$PageInitilizer.run(PageViewComponentImpl.java:1077)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Apr 11, 2011 4:40:34 PM org.icepdf.core.pobjects.graphics.ICCBased getColor
FINE: Error getting ICCBased colour
java.awt.color.ProfileDataException: Invalid profile sequence
at sun.awt.color.ICC_Transform.<init>(ICC_Transform.java:103)
at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:148)
at org.icepdf.core.pobjects.graphics.ICCBased.getColor(ICCBased.java:178)
at org.icepdf.core.util.ContentParser.consume_SC(ContentParser.java:1797)
at org.icepdf.core.util.ContentParser.parse(ContentParser.java:661)
at org.icepdf.core.pobjects.Page.init(Page.java:390)
at org.icepdf.core.views.swing.PageViewComponentImpl$PageInitilizer.run(PageViewComponentImpl.java:1077)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Apr 11, 2011 4:40:34 PM org.icepdf.core.pobjects.graphics.ICCBased getColor
I've taken a pretty close look at this issue and it comes down to a major parsing issue with our ListeralString and HextString objects. In the case of the is PDF we convert convert "\u001A\u0011" to 6673 instead of \u001A and \u0011.
This issue has been present for quite some time but generally only shows up in with Asian content which makes it harder to to recognize. Need some more time to review the spec as to the proper way of parsing these types of strings.