Forums Register Login

how to use barcode4j with custom messages???

+Pie Number of slices to send: Send
Hi folks,
I am using "barcode4j" with Apache FOP, to generate barcode and print in a PDF. Now, the barcode is taking only hard-coded messages. How can i pass, custom messages in that?

Below, is my custom xsl-code::
<fo:block>
<fo:instream-foreign-object>
<barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"
message="1234567">
<barcode:Code39> <barcode:height>1.5cm</barcode:height></barcode:Code39>
</barcode:barcode>
</fo:instream-foreign-object>
</fo:block>

let m know, how to pass custom messages into 'message' section?
+Pie Number of slices to send: Send
Why don't you just write some Java code that generates this piece of XML and inserts whatever message you like into the XML? And then pass the generated XML to Apache FOP.
+Pie Number of slices to send: Send
Hi there,
That's a really good advice, which i've tried but failed. Thething is, whenever i am trying pass the generated xml from java to XSL-transformer, as a param, it's taking the xml, as a String(of course, it should). So, how do i append the xml from java into XSL file?
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3663 times.
Similar Threads
XSL-FO to PDF using fop
Vertical text in PDF using FOP
Barcode generation problem with fop-0.95
FOP and SVG Files
problem with barcodes
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:01:53.