BarcodePostnet 2007-11-12 - By Abraham
Back Hi all,
I`m trying to add a table with a BarcodePostnet image to already created document . This is my code (barcode128 works fine with same code):
BarcodePostnet postNet = new BarcodePostnet(); postNet.setCode("Probando"); Image imagePN = postNet.createImageWithBarcode(stamper.getUnderContent( reader.getNumberOfPages()),null, null); //here cell = new PdfPCell(new Phrase(new Chunk(imagePN,0,0)));
and i get the next exception (third line):
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 17 at com.lowagie.text.pdf.BarcodePostnet.getBarsPostnet(Unknown Source) at com.lowagie.text.pdf.BarcodePostnet.placeBarcode(Unknown Source) at com.lowagie.text.pdf.Barcode.createTemplateWithBarcode(Unknown Source) at com.lowagie.text.pdf.Barcode.createImageWithBarcode(Unknown Source)
Do I need to add any code to fix this?
Thanks in advance (and excuse my english). Regards, Abraham.
Hi all,<br><br>I`m trying to add a table with a BarcodePostnet image to already created document . This is my code (barcode128 works fine with same code):<br> <br>BarcodePostnet postNet = new BarcodePostnet();<br>postNet.setCode ("Probando");<br>Image imagePN = postNet.createImageWithBarcode (stamper.getUnderContent(reader.getNumberOfPages()),null, null); //here<br >cell = new PdfPCell(new Phrase(new Chunk(imagePN,0,0)));<br><br>and i get the next exception (third line): <br><br>Exception in thread "main" java.lang .ArrayIndexOutOfBoundsException: 17<br> at com.lowagie.text.pdf.BarcodePostnet.getBarsPostnet (Unknown Source)<br> at com.lowagie.text.pdf.BarcodePostnet.placeBarcode(Unknown Source)<br> at com.lowagie.text.pdf.Barcode.createTemplateWithBarcode (Unknown Source)<br> at com.lowagie.text.pdf.Barcode.createImageWithBarcode (Unknown Source)<br><br>Do I need to add any code to fix this? <br><br>Thanks in advance (and excuse my english). Regards, Abraham.<br><span style="font-size: larger;"> </span>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|