Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.3, 2.0.4, 3.0.0 PDFBox
-
None
-
windows
Description
Pdf file using CourierStd font doesn't display properly with PDF Debugger (CourierStd font not installed, using substitute font). File is properly displayed in Adobe Reader.
PDF Debugger output:
ADVERTENCIA: Using fallback LiberationSans for CID-keyed font CourierStd sep 27, 2016 4:42:00 PM org.apache.pdfbox.pdmodel.font.PDType0Font toUnicode ADVERTENCIA: No Unicode mapping for CID+36 (36) in font CourierStd sep 27, 2016 4:42:00 PM org.apache.pdfbox.rendering.CIDType0Glyph2D getPathForCharacterCode ADVERTENCIA: No glyph for 36 (CID 0024) in font CourierStd
If I install CourierStd otf font from http://freeopentypefonts.com/fonts-beginning-with-c/courierstd-open-type-font-download-open-type-font then I get the following exception:
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.apache.fontbox.cff.CFFType1Font cannot be cast to org.apache.fontbox.cff.CFFCIDFont org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:258) sun.swing.AccumulativeRunnable.run(Unknown Source) java.security.AccessController.doPrivileged(Native Method) java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.apache.fontbox.cff.CFFType1Font cannot be cast to org.apache.fontbox.cff.CFFCIDFont org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:247) sun.swing.AccumulativeRunnable.run(Unknown Source) java.security.AccessController.doPrivileged(Native Method) java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) Caused by: java.lang.ClassCastException: org.apache.fontbox.cff.CFFType1Font cannot be cast to org.apache.fontbox.cff.CFFCIDFont org.apache.pdfbox.pdmodel.font.PDCIDFontType0.<init>(PDCIDFontType0.java:134) org.apache.pdfbox.pdmodel.font.PDFontFactory.createDescendantFont(PDFontFactory.java:121) org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:128) org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:83) org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
Maybe similar to: https://issues.apache.org/jira/browse/PDFBOX-3344