Hello,

 

I'm 100% sure I'm missing something stupid here, but I looked at my
iText in Action book and also browsed the internet. Nadda.

I have a LC form (so it is XFA) that has a single 3of9 barcode field. Im
my code I set the value of the field and flatten the form. After this
the field contains the cleartext of the value (in my example '98765')
not the barcoded representation.

 

Whatever it is, I'm already embarrassed, so bear with me...

 

Thanks,

 

PdfReader reader = new PdfReader("AForm.pdf");

    try{

      stamper = new PdfStamper(reader,new FileOutputStream("tmp.pdf"));

    } catch (DocumentException e)

     {

       e.printStackTrace();

     }

 

    AcroFields form = stamper.getAcroFields();

    try {

      form.setField("Formular1.FirstPage.BarcodeField[0]", "98765");

      form.setGenerateAppearances(true); // no difference if true or
false

    }catch (DocumentException e)

     {

       e.printStackTrace();

     }

 

    reader.close();

    stamper.setFormFlattening(true);

    try {

      stamper.close();

    } catch (DocumentException e)

     {

       e.printStackTrace();

     }

 

 

/Gerold

 

CONFIDENTIAL NOTICE: The contents of this message, including any
attachments, are confidential and are intended solely for the use of the
person or entity to whom the message was addressed. If you are not the
intended recipient of this message, please be advised that any
dissemination, distribution, or use of the contents of this message is
strictly prohibited. If you received this message in error, please
notify the sender. Please also permanently delete all copies of the
original message and any attached documentation. Thank you.

 

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to