Hello,
i am currently writing a custom report exporter.
My report contains lines, text, rectangle and a barcode.
For the custom reporter i am extending JRAbstractExporter and implementing exportReport() method.
Iterating over jasperPrint.getPages() and for every page iterating over jrPrintPage.getElements.
Elements are for example JRTemplatePrintLine, JRTemplatePrintText, JRTemplatePrintRectangle and so on....
So far so good..
But the barcode element is an JRTemplatePrintImage... i guess because exporters like pdf exporter outputs svg images.
But for my custom exporter i have to output something like
BARCODE
C128B;DARK;40;15
*barcode value*
STOP
and not a svg image!
BUT I SEE NO WAY HOW TO GET THE C128B INFORMATION FROM JRTemplatePrintImage!
In the jasperDesign oder jasperReport object, the barcode is represented by net.sf.jasperreports.components.barcode4j.Code128Component class. In the jasperPrint object by JRTemplatePrintImage.
I didn't find anything like JRTemplatePrintImage.getBarcodeComponent().getBarcodeType()...
I even didn't find a way to get the text under the barcode and the text in the barcode from JRTemplatePrintImage.
But without barcode export possibility i can trash my exporter...
Any hint for me?
Kind regards
1 Answer:
Using code is too complicated for me.
As for myself, I used to generate barcode with the help of a barcode generater SDK.
It is just one of many but I do appreciate its simple way of processing.
Even though I only tried its free trial package to generate and view barcodes and didn′t check the cost and licensing conditions, it worked great for me.
Besides, this site gives a lot of choices for processing different kinds of document and image formats.
Share with you. And I hope yo\u success. Good luck.
Best regards,
Arron
hey,i used qr code barcode (http://www.keepautomation.com/products/android_barcode/barcodes/qrcode.html) on my android,but i did not find an available barcode reader(http://www.keepautomation.com/products/net_barcode_reader/barcode_codaba...) on it,does your site support this ?