Using krysalis with Tomcat to output PDF barcodes
"Alexandre Anfray" <[email protected]> Mon, 30 Aug 2004 09:02:29 +0200
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <001601c48e5f$507cccd0$130064c0@alexandre> |
Hello,
I'd like to use krysalis with FOP in Tomcat to output pdf
I'm working on Linux Red Hat 7.3, fop-0.20.5, krysalis-barcode-1.0beta,
jdk1.3.1_02
What already works:
==============
1) outputing barcodes in PDF files with fop-0.20.5 in command-line (with the
./fop.sh script)
I make it work by adding the
krysalis-barcode-fop-ext-0.20.5-complete.jar in the classpath
(and also add the avalon-framework-4.1.4.jar)
2) outputting PDF files from *.fo input with a FopServlet in Tomcat
the url looks like:
http://server:8080/fop/servlet/FopServlet?fo=simple.fo
I added the krysalis-barcode-fop-ext-0.20.5-complete.jar and the
avalon-framework-4.1.4.jar
in the lib directory of the servlet (tomcat/webapps/fop/WEB-INF/lib)
if i try an *.fo file with barcode instructions
<barcode:barcode xmlns:barcode="http://www.krysalis.org/barcode/ns"
msg="my message">
<barcode:code128>
<barcode:height>8mm</barcode:height>
</barcode:code128>
</barcode:barcode>
on the Tomcat server, it outputs the PDF correctly but WITHOUT the
barcode...
looking in the log file from Tomcat, i see a possible error:
Starting service Tomcat-Apache
Apache Tomcat/4.0
[ERROR]: Logger not set
[INFO]: building formatting object tree
[ERROR]: Unknown formatting object
http://www.krysalis.org/barcode/ns^barcode
[ERROR]: Unknown formatting object
http://www.krysalis.org/barcode/ns^code128
[ERROR]: Unknown formatting object http://www.krysalis.org/barcode/ns^height
[INFO]: [1]
[ERROR]: no handler defined for http://www.krysalis.org/barcode/ns:barcode
foreign xml
[INFO]: Parsing of document complete, stopping renderer
In conclusion, the simple_barcode.fo file works well in command-line but not
in Tomcat server.
If anyone can help....
Thanks
Alex