Re: barcode generation with FOP
Jeremias Maerki <[email protected]> Fri, 23 Apr 2004 14:18:41 +0200
| Newsgroups | gmane.comp.krysalis.user |
|---|---|
| Message-ID | <[email protected]> |
Did you follow the instructions closely? It seems as if you don't have
the FOP extension in your classpath. Make sure you add the right JAR to
your classpath, the one with the FOP extension in it. You may have to
adjust the fop.bat file so the barcode extension really gets loaded.
On 21.04.2004 13:54:19 O'Neill, Ciaran wrote:
> Hi,
>
> I'm trying to get barcodes to appear on my PDF using Apache FOP.
>
> When I run fop with the barcodes in my XSL I get the following output.
>
> ############################################################################
> ##########################
> C:\Program Files\My Installs\Apache FOP\fop-0.20.5>fop -xml
> C:\MySaves\fo\udwmanifest\manifest.xml -xsl
> C:\MySaves\fo\udwmanifest\tmp.xsl -pdf C:\MySaves\fo\udwmanifest\test2.pdf
> [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [INFO] FOP 0.20.5
> [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [INFO] building formatting object tree
> [INFO] setting up fonts
> [ERROR] Unsupported element encountered: barcode (Namespace:
> http://www.krysalis.org/barcode/ns). Source context: unavailable
> [ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect, etc.)
> or elements from another supported language.
> [ERROR] Unsupported element encountered: code128 (Namespace:
> http://www.krysalis.org/barcode/ns). Source context: unavailable
> [ERROR] Unsupported element encountered: height (Namespace:
> http://www.krysalis.org/barcode/ns). Source context: unavailable
> [INFO] [1]
> [ERROR] no handler defined for http://www.krysalis.org/barcode/ns:barcode
> foreign xml
> [INFO] [2]
> [ERROR] no handler defined for http://www.krysalis.org/barcode/ns:barcode
> foreign xml
> [INFO] [3]
> [ERROR] no handler defined for http://www.krysalis.org/barcode/ns:barcode
> foreign xml
> [INFO] Parsing of document complete, stopping renderer
>
> C:\Program Files\My Installs\Apache FOP\fop-0.20.5>
> ############################################################################
> ##########################
>
> My XSL declaration at the start si as follows:
> <xsl:stylesheet xmlns:fox="http://xml.apache.org/fop/extensions"
> xmlns:print="http://www.jcatalog.com/com.jcatalog.output.xslextensions.print
> .PrintElementFactory" xmlns:fo="http://www.w3.org/1999/XSL/Format"
> version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:saxon="http://icl.com/saxon">
>
> Here is the section of code for the barcode:
> ############################################################################
> ##########################
> <fo:block-container position="absolute" top="29pt" left="434pt"
> height="27.0pt" width="118.0pt" border-width="1.0pt" display-align="before">
> <fo:block>
> <fo:instream-foreign-object>
> <xsl:variable name="barcd">
> <xsl:value-of select="manifest-no" />
> </xsl:variable>
> <barcode:barcode xmlns:barcode="http://www.krysalis.org/barcode/ns"
> message="{$barcd}">
> <barcode:code128>
> <barcode:height>10mm</barcode:height>
> </barcode:code128>
> </barcode:barcode>
> </fo:instream-foreign-object>
> </fo:block>
> </fo:block-container>
> ############################################################################
> ##########################
>
> Could anyone lpease help me with this?
>
> TIA,
> Ciaran.
Jeremias Maerki
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297