Details
Description
Subtype is parsed as "Type0" by PDFBox, but parsed as "Type1" by Adobe Reader.
This is not a bug of PDFBox.
The reason is TCPDF 4.5.041 generate font AdobeSongStd-Light with bad subtype "Type0".
It should be "Type1".
I have test the following codes and they work.
File: org/apache/pdfbox/pdmodel/font/PDFontFactory.java
Method: public static PDFont createFont( COSDictionary dic ) throws IOException
Original:
else if( subType.equals( COSName.TYPE0 ) )
{
retval = new PDType0Font( dic );
}
Fixed:
else if( subType.equals( COSName.TYPE0 ) )
{
COSName encoding = (COSName)dic.getDictionaryObject(COSName.ENCODING);
retval = (encoding!=null) ? new PDType1Font( dic ) : new PDType0Font( dic );
}
With such patch PDFBox will act like Adobe Reader.