Hi, I use the TTFReader to generate the font file from ttf or ttc to type 1 font file used by FOP. Since I wanna use chinese and unicode, therefore, two font files namely arialuni.ttf from Win2K and mingliu.ttc from Chinese WinNT have been selected. Unfortunately, I encouter different error as converting these files arialuni.ttf = OutofMemoery return mingliu.ttc = java.io.IOException: Failed to read font at java.lang.Throwable.fillInStackTrace can you help me to resolve it. Another question, according to your instruction, the converted font file should be included in conf/userconfig.xml and then use fop.sh (in unix)to generate the PDF file. How about in servlet version, can we instruct the program to read this configuration file to include the fonts in PDF file Thanks Andrew
Problem 1: Arialuni.ttf: I can't reproduce the problem. Check the Memory settingsof your JVM Problem 2: mingliu.ttc: A ttc file is a collection of TrueType fonts, not a single font. You have to supply the font to extract with the -ttcname option Problem 3: Using a userconfig for a embedded FOP: this is a FAQ. Check the archives for the fop-user and fop-dev lists, as mentioned in the documentation delivered with the FOP binary distribution (docs/html-docs/ressources.html)
For the problem 2, I use the following command: java -cp build/fop.jar:lib/xercesImpl-2.0.1.jar:lib/xml-apis.jar:lib/xalan- 2.3.1.jar:lib/batik.jar org.apache.fop.fonts.apps.TTFReader -ttcname "Ming Liu" /data/fop/fop-0.20.4/mingliu.ttc mingliu.xml the result is: TTF Reader v1.1.1 Reading /data/fop/fop-0.20.4/mingliu.ttc... This is a TrueType collection file with2 fonts Containing the following fonts: MingLiU PMingLiU java.io.IOException: Failed to read font at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Exception.java:42) at java.io.IOException.<init>(IOException.java:47) at org.apache.fop.fonts.TTFFile.readFont(Unknown Source) at org.apache.fop.fonts.apps.TTFReader.loadTTF(Unknown Source) at org.apache.fop.fonts.apps.TTFReader.main(Unknown Source)
You can't extract fonts which are not in the font collection. Try -ttcname "MingLiU"
one more question, is it possible to generate the chinese PDF file in version 1.2 which can be viewed by arcobat 3.0. Many thanks
for more information, can I use your FOP to generate the PScript and then directly forward to client browser for printing.
batch transition to closed remaining pre-FOP1.0 resolved bugs