Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.4
-
Fix Version/s: 5.0.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:Linux Red Hat 5.8, Mac 10.6.8
-
Salesforce Case Reference:
Description
Detailed analysis of bug provided by user:
I have a PDF document that contains round brackets in Arial (non-embedded). After I converted the PDF to PNG image, I found that all closing round brackets ")" are replaced with opening brackets "(". For example, 123(4)5 would become 123(4(5.
Since our system (Linux Red Hat 5.8) does not have the font Arial installed (only installed Arial MT), I turned on the FINEST log and found that ICEPdf used LucidaSans, which is installed in system, for font substitution.
I found the below log in console:
FINE: Font Substitution: Found java font: LucidaSans for named font Arial
I also tested 2 individual PDF documents, both containing only LucidaSans font (one embedded and another non-embedded). I found that the embedded one worked fine while the non-embedded one was having this issue.
I have a PDF document that contains round brackets in Arial (non-embedded). After I converted the PDF to PNG image, I found that all closing round brackets ")" are replaced with opening brackets "(". For example, 123(4)5 would become 123(4(5.
Since our system (Linux Red Hat 5.8) does not have the font Arial installed (only installed Arial MT), I turned on the FINEST log and found that ICEPdf used LucidaSans, which is installed in system, for font substitution.
I found the below log in console:
FINE: Font Substitution: Found java font: LucidaSans for named font Arial
I also tested 2 individual PDF documents, both containing only LucidaSans font (one embedded and another non-embedded). I found that the embedded one worked fine while the non-embedded one was having this issue.
Added a system property org.icepdf.core.font.basefont that changes the base font name from lucidasans which is a Java Physical Font name. The name should be change to one of Java's logical font names:Dialog, DialogInput, Monospaced, Serif, SansSerif. The closest logical name that match LucidaSans is SansSerif.
The default value is:
-Dorg.icepdf.core.font.basefont=lucidasans;
I would recommend using:
-Dorg.icepdf.core.font.basefont=sansserif