Works for me using version itext-paulo-130.

Best Regards,
Paulo Soares 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Lino Helms
> Sent: Sunday, May 09, 2004 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [iText-questions] Barcode Issue
> 
> Lino Helms wrote:
> 
> > Hi,
> >
> > i am experiencing weird problems with the iText Barcode function.
> >
> > When I add more than 4 or 5 Barcodes an exception is being thrown.
> >
> > Exception:
> >
> > java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
> > at java.util.ArrayList.RangeCheck(ArrayList.java:507)
> > at java.util.ArrayList.set(ArrayList.java:340)
> > at com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:237)
> > at 
> > 
> com.lowagie.text.pdf.PdfWriter.addSharedObjectsToBody(PdfWrite
> r.java:820)
> > at com.lowagie.text.pdf.PdfWriter.close(PdfWriter.java:874)
> > at com.lowagie.text.pdf.PdfDocument.close(PdfDocument.java:1051)
> > at com.lowagie.text.Document.close(Document.java:497)
> > at com.helms_it.s3server.DB.main(DB.java:360)
> >
> > Code:
> >
> > try{
> > PdfWriter writer = PdfWriter.getInstance(document, new 
> > FileOutputStream("pdftmp.pdf"));
> > document.open();
> > PdfContentByte cb = writer.getDirectContent();
> > BarcodeEAN codeEAN = new BarcodeEAN();
> > codeEAN.setCodeType(BarcodeEAN.EAN8);
> > codeEAN.setFont(null);
> > codeEAN.setCode("00000025");
> > Image imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Infopost\n0,25EUR 20g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000045");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Postkarte National\n0,45EUR 20g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000045");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Infobrief\n0,45EUR 20g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000055");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Standard\n0,55EUR 20g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000100");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Kompakt\n1,00EUR 50g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000144");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Gro�\n1,44EUR 500g"));
> > document.add(imageEAN);
> > codeEAN.setCode("00000220");
> > imageEAN = codeEAN.createImageWithBarcode(cb, null, null);
> > document.add(new Phrase("Brief National Maxi\n2,20EUR 1000g"));
> > document.add(imageEAN);
> > document.close();
> > }catch(Throwable t){
> > t.printStackTrace();
> > }finally{
> > }
> >
> > Does anybody know a solution for this problem?
> >
> > Best regards
> > Lino
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by Sleepycat Software
> > Learn developer strategies Cisco, Motorola, Ericsson & 
> Lucent use to 
> > deliver
> > higher performing products faster, at low TCO.
> > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> The Problem seems to be solved. I added Chunks containing 
> Images instead 
> and it works... But probably there is  a bug in iText which 
> caused the 
> original problem...
> 
> Regards
> Lino
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by Sleepycat Software
> Learn developer strategies Cisco, Motorola, Ericsson & Lucent 
> use to deliver
> higher performing products faster, at low TCO.
> http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to