And this>>
at com.lowagie.text.pdf.BarcodePDF417
means you are using an old 'unsupported' version of the library
you are unlikely to get the help you desire..
john renfrew
Right Way Up
From: Eduardo Pindado [mailto:edu_p...@hotmail.com]
Sent: 15 February 2013 11:24
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Encoding base64 in Barcode
I'm trying to generate a PDF with digital signature. After getting it, I
wanted to add the signature information in base64 to a barcode, but i don't
know what code type have to use. I tested with BarcodePDF417 but I get this
error:
Exception in thread "main" java.lang.IndexOutOfBoundsException: The text is
too big.
at com.lowagie.text.pdf.BarcodePDF417.textCompaction (BarcodePDF417.java:
359)
at com.lowagie.text.pdf.BarcodePDF417.assemble (BarcodePDF417.java: 604)
at com.lowagie.text.pdf.BarcodePDF417.paintCode (BarcodePDF417.java: 675)
at com.lowagie.text.pdf.BarcodePDF417.getImage (BarcodePDF417.java: 772)
at firmaPDF.insertaBarCode (firmaPDF.java: 169)
at firmaPDF.main (firmaPDF.java: 61)
The sign has between 1800 and 3000 characters, minimum and maximum. This is
the code I have:
......
PdfReader reader = null;
PdfStamper stamper = null;
try {
reader = new PdfReader (rutaEntrada);
stamper = new PdfStamper (reader, new FileOutputStream
(rutaSalida));
int maxPagina = reader.getNumberOfPages();
PdfContentByte underContent = stamper.getUnderContent
(maxPagina);
/ / Insert barcode
BarcodePDF417 BarcodePDF417 codePDF417 = new ();
codePDF417.setText (deskSign.getString ());
Image imageEAN codePDF417.getImage = ();
imageEAN.setAbsolutePosition (100f, 10f);
underContent.addImage (imageEAN);
} Catch .....
Do i have to define something more? Or should I use other encodings?
thanks
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php