barcode generation with FOP

"O'Neill, Ciaran" <Ciaran.O'[email protected]> Wed, 21 Apr 2004 12:54:19 +0100
Newsgroups gmane.comp.krysalis.user
Message-ID <C86D15453EF3D6118B0700508BAE64C623254E@exc-dub1>
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.




CiarĂ¡n O'Neill
IT Department,
United Drug Plc,
Magna Business Park,
Citywest Road,
Dublin 24.
*  +353 1 463 2535
Fax +353 1 463 2397
* www.united-drug.com



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click