xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Philippe Courson <jean-philippe.cour...@cognitran.com>
Subject Re: Chinese PDFs and non embedded fonts
Date Tue, 24 Apr 2012 15:10:19 GMT
Hi Chris,

Thanks for your reply.

The configuration-referenced.xml starts like this:

<fop version="1.0">
  <base>.</base>
  <source-resolution>72</source-resolution>
  <target-resolution>72</target-resolution>
  <default-page-settings height="11in" width="8.26in"/>
  <fonts>
    <referenced-fonts>
      <match font-family=".*"/>
    </referenced-fonts>
  </fonts>

I also tried not using <auto-detect/>:

1) Using a CID-keyed font metrics file:

~/Downloads/fop-1.0/test$ java -cp ../build/fop.jar:../lib/avalon-framework-4.2.0.jar:../lib/batik-all-1.7.jar:../lib/commons-io-1.3.1.jar:../lib/commons-logging-1.0.4.jar:../lib/serializer-2.7.0.jar:../lib/xalan-2.7.0.jar:../lib/xercesImpl-2.7.1.jar:../lib/xml-apis-1.3.04.jar:../lib/xml-apis-ext-1.3.04.jar:../lib/xmlgraphics-commons-1.4.jar
org.apache.fop.fonts.apps.TTFReader fonts/SimSun.ttf simsun-cid.xml
TTF Reader for Apache FOP 1.0
Parsing font...
Reading fonts/SimSun.ttf...
Font Family: [宋体, SimSun]
Creating xml font file...
Creating CID encoded metrics...
Writing xml font file simsun-cid.xml...
This font contains no embedding license restrictions.

~/Downloads/fop-1.0/test$ ../fop -fo test-fo.xml -c configuration-referenced-no-autodetect-cid.xml
output-referenced-no-autodetect-cid.pdf

The produced PDF can not be opened by Acrobat Reader which gives the following error message:
"Cannot find or create the font 'SimSun'. Some characters may not display or print correctly".
This SimSun font is correctly installed on my machine.

2) Using a WinAnsi-encoded font metrics file:

~/Downloads/fop-1.0/test$ java -cp ../build/fop.jar:../lib/avalon-framework-4.2.0.jar:../lib/batik-all-1.7.jar:../lib/commons-io-1.3.1.jar:../lib/commons-logging-1.0.4.jar:../lib/serializer-2.7.0.jar:../lib/xalan-2.7.0.jar:../lib/xercesImpl-2.7.1.jar:../lib/xml-apis-1.3.04.jar:../lib/xml-apis-ext-1.3.04.jar:../lib/xmlgraphics-commons-1.4.jar
org.apache.fop.fonts.apps.TTFReader -enc ansi fonts/SimSun.ttf simsun-ansi.xml
TTF Reader for Apache FOP 1.0
Parsing font...
Reading fonts/SimSun.ttf...
Font Family: [宋体, SimSun]
Creating xml font file...
Creating WinAnsi encoded metrics...
Writing xml font file simsun-ansi.xml...
This font contains no embedding license restrictions.

~/Downloads/fop-1.0/test$ ../fop -fo test-fo.xml -c configuration-referenced-no-autodetect-ansi.xml
output-referenced-no-autodetect-ansi.pdf
Apr 24, 2012 3:30:52 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "仅" (0x4ec5) not available in font "SimSun".
Apr 24, 2012 3:30:52 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "供" (0x4f9b) not available in font "SimSun".
Apr 24, 2012 3:30:52 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "参" (0x53c2) not available in font "SimSun".
Apr 24, 2012 3:30:52 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "考" (0x8003) not available in font "SimSun".

The produced PDF shows # characters for every chinese symbol.

I attached to this email all the files used in the example as well as the produced PDFs.

Thanks in advance for your help,

Best regards,
JP


Mime
View raw message