On Jan 18, 2005, at 8:18 AM, [EMAIL PROTECTED] wrote:
We have an api that generates a sort of "barcode" image that needs to be put on
the bottom of each page. However, each image is unique and needs to be
generated with some information from the xml document. I know I can do this by
using a REST api call and putting a URL in the fo:graphic that dynamically
generates the image. However, I'd rather do it right in the Java code that
sets up the Driver. So, is this possible? Some thoughts I have, but don't
know if they exist:


1. Can I get a callback that calls my Java code when a certain fo:graphic
element is hit and let me dynamically put the XSL:FO content in there? This
would allow me to dynamically generate the images on the fly and put the
appropriate image content in .
2. Can I put custom xsl:fo elements in the document and then register my own
"renderers" for dealing with those types?


Any reccomendations and/or help would be greatly appreciated.

You can do this either by embedding a barcode font[1] or by using the excellent and open source Barcode4J[1], which is listed in the FOP Resources page "FOP Add-ons' section. As for a callback, I suspect it's possible, but don't know how.


Good luck!

[1]
http://user.it.uu.se/~jan/barfonts/
[2]
http://xml.apache.org/fop/resources.html#products-fop-add-ons

Web Maestro Clay
--
<[EMAIL PROTECTED]> - <http://homepage.mac.com/webmaestro/>
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet


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



Reply via email to