Can not render PDF with Simplified Chinese due to changing font to the default 
font
-----------------------------------------------------------------------------------

                 Key: PDFBOX-1215
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1215
             Project: PDFBox
          Issue Type: Improvement
    Affects Versions: 1.7.0
         Environment: Linux 2.6.18, x64, java version "1.6.0_29-ea"
Java(TM) SE Runtime Environment (build 1.6.0_29-ea-b08)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b01, mixed mode)
Version 1.7.0 from trunk on January 24.
            Reporter: Guido Leenders
            Priority: Minor


Using pdfbox to render the first page of pdf documents to images for use in 
manuals. Currently, we are adding Chinese language support.

In PDSimpleFont, the code prints and used to print:
 WARNING: Changing font on <รข> from <Lucida Sans Regular> to the default font

With European fonts, the result was not very pretty but acceptable. With 
Chinese characters, the default font just shows "squares".

Added entries to pdfbox_external_fonts.properties for better Unicode support of 
the fonts to be used, such as:

Arial Bold=org/apache/pdfbox/resources/ttf/ARIALUNI.TTF
Lucida Sans Regular=org/apache/pdfbox/resources/ttf/ARIALUNI.TTF

Did not change fontmapping.properties. And rebuild. Also tested with normal 
Windows ttf files for Lucida Sans. Still squares and errors. Looked for another 
hour in the source code, but was unable to find what the problem was.

Suggested improvement: provide better hints to user what to do to resolve this 
issue.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to