iText doesn't support Designer. Create your fields with Acrobat.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lassemo, Stian
Sent: Wednesday, March 22, 2006 12:16 PM
To: [email protected]
Subject: [iText-questions] Itext support for Adobe 7.0 products

Hi

 

I have created a PDF containing acrofields in Adobe Professional 7.0.

When I try to populate acrofields using Itext everyting looks ok.

However when I open the pdf in Adobe Reader 7.0.7 the fields are empty.

If I try to read the fields using itext or other pdf reader products, the fields are populated correctly.

Is this a problem in itext supporting pdf version 1.6?

 

My java code looks like this.

 

                            PdfReader reader = new PdfReader("C:\\test.pdf");

                            PdfStamper stamp = new PdfStamper(reader, new FileOutputStream("C:\\test2.pdf"));

                            AcroFields form = stamp.getAcroFields();

                                                    

                            PdfContentByte over = stamp.getOverContent(1);   

                                       

                            Map field = form.getFields();

                                                    

                            for ( Object fieldname: field.entrySet().toArray() )

                            {

                                    System.out.println( "Field : "+fieldname );

                            }

                            //set the field values in the pdf form

                           

                            System.out.println( "GetField :"+ form.getField("form1[0].#subform[0].fornavn[0]"));

                            System.out.println( "SetField :"+ form.setField("form1[0].#subform[0].fornavn[0]","itext"));

                            //System.out.println( "SetField :"+ form.setListOption("ComboBox1.0", array, array));

                                   

                           

                            stamp.setFormFlattening( false );

                            stamp.close();

 

 

Stian

Reply via email to