Hey Guys,

I’m trying to import two fonts – Barcode3of9 and BC4State..

The BC4 State one seems to work fine from first creating the metrics file :

java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.3.1.jar org.apache.fop.fonts.apps.TTFReader -fn "BC4State"
fonts/bc4state.ttf bc4state.xml

I use the same step to create the 3 of 9 metric:

java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.3.1.jar org.apache.fop.fonts.apps.TTFReader -fn "3 of
9Barcode" fonts/3of9BarCode.ttf 3Of9barcode.xml

In my configuration I have:

<fonts>                
<font metrics-url="file:///C:/pdfbin/fop-0.94beta/3Of9barcode.xml"
kerning="yes"
embed-url="file:///C:/pdfbin/fop-0.94beta/fonts/3Of9Barcode.ttf">
<font-triplet name="Barcode3of9" style="normal" weight="normal" />
</font>
        
<font metrics-url="file:///C:/pdfbin/fop-0.94beta/bc4state.xml"
kerning="yes" embed-url="file:///C:/pdfbin/fop-0.94beta/fonts/bc4state.TTF">
<font-triplet name="bc4state" style="normal" weight="normal" />
</font>
</fonts>

(in both the PDF renderer and the PCL renderer block)

The command line I’m using is:

C:\pdfbin\fop-0.94\fop.bat "E:\work\printer_test\test.fo" -c
"c:\pdfbin\fop-0.94\conf\fop.xconf" -pcl "e:\work\printer_test\test.pcl"

I do not see any errors for BC4State.. as when both were failing I would
see:
WARNING: Font 'Barcode3of9,normal,400' not found. Substituting with
'any,normal,400'.
WARNING: Font 'BC4State,normal,400' not found. Substituting with
'any,normal,400'.

However, on startup, I see this error:

2/06/2008 10:45:57 org.apache.fop.fonts.FontCache loadFrom
WARNING: I/O exception while reading font cache
(org.apache.fop.fonts.FontCache;
 local class incompatible: stream classdesc serialVersionUID =
605232520271754718, local class serialVersionUID = 605232520271754717).
Discarding font cache file.
2/06/2008 10:45:57 org.apache.fop.apps.FopFactoryConfigurator configure

And further down when trying to use the font:
WARNING: Font 'Barcode3of9,normal,400' not found. Substituting with
'any,normal,400'.

As extra information – I tried to create a metrics file using the same
command line above in fop-0.95beta and I get:

C:\pdfbin\fop-0.95beta>java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.3.1.jar org.apache.fop.fonts.apps.TTFReader -fn "3 of
9Barcode" fonts/3of9BarCode.ttf 3Of9barcode.xml
TTF Reader for Apache FOP 0.95beta

Parsing font...
Reading fonts/3of9BarCode.ttf...
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xmlgraphics/fonts/Glyphs
        at
org.apache.fop.fonts.truetype.TTFFile.initAnsiWidths(TTFFile.java:444)
        at org.apache.fop.fonts.truetype.TTFFile.readFont(TTFFile.java:493)
        at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:209)
        at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:164)
Caused by: java.lang.ClassNotFoundException:
org.apache.xmlgraphics.fonts.Glyphs
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 4 more

I figure I have to get the fonts embedded correctly if I am to jump straight
from FO -> PCL.

Am I doing anything obviously wrong here? 

Additionally – is there any problems with me using Saxon to do the XSL/XML
processing to create an FO file, then using FOP to convert to my desired
format?

Thanks Guys,
Martin.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to