The barcode tag works if I use plain text as the content, example:
<table columns="1" width="100">
<cell halign="center" border-style="none">
<barcode type="CODE39" bar-height="10">1234</barcode>
</cell>
</table>
However, I would like to put an expression inside the tag. For example
When I use the expression, I get the following error:
org.ujac.print.DocumentHandlerException: The character '{' is illegal in code 39.
at org.ujac.print.DocumentPrinter.printDocument(DocumentPrinter.java:356)
at com.kmm.pres.ujac.ContractGenerator.generateUJAC(ContractGenerator.java:52)
at com.kmm.pres.ujac.ContractGenerator.main(ContractGenerator.java:71)
Caused by: ExceptionConverter: java.lang.IllegalArgumentException: The character '{' is illegal in code 39.
Is there anything I can do to get the expression evaluated?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The barcode tag works if I use plain text as the content, example:
<table columns="1" width="100">
<cell halign="center" border-style="none">
<barcode type="CODE39" bar-height="10">1234</barcode>
</cell>
</table>
However, I would like to put an expression inside the tag. For example
<table columns="1" width="100">
<cell halign="center" border-style="none">
<barcode type="CODE39" bar-height="10">${MY_ID}</barcode>
</cell>
</table>
When I use the expression, I get the following error:
org.ujac.print.DocumentHandlerException: The character '{' is illegal in code 39.
at org.ujac.print.DocumentPrinter.printDocument(DocumentPrinter.java:356)
at com.kmm.pres.ujac.ContractGenerator.generateUJAC(ContractGenerator.java:52)
at com.kmm.pres.ujac.ContractGenerator.main(ContractGenerator.java:71)
Caused by: ExceptionConverter: java.lang.IllegalArgumentException: The character '{' is illegal in code 39.
Is there anything I can do to get the expression evaluated?
Try this:
<table columns="1" width="100">
<cell halign="center" border-style="none">
<barcode type="CODE39" bar-height="10"><![CDATA[${MY_ID}]]></barcode>
</cell>
</table>
Hi Jim,
you're right, the support for dynamic barcodes has been missing so far. I've fixed this issue.
Thanx for helping to make UJAC better.
Best regards,
Christian
Thanks, I have found your print funcationality very useful. I appreciate your responsiveness to issues.