Hi Paulo et al, Thanks for the reply. I know you are inundated with questions so I really appreciate the feedback, and I'll make this as brief as possible.
Here's what I have done to date. 1) I have a form-letter that I'd need to use as a template. This template was created with fields using MSWord. 3) I converted the template to PDF. 4) I'm trying to use the AcroFields object (per example) to update the dynamic fields and write that to a new PDF file. The I/O from template to new PDF works fine, but the fields are not being set correctly. My questions: 1) How do I convert my word template to PDF so that the following code excerpt will work?: PdfReader reader = new PdfReader("BidInvitationTemplateForm.pdf"); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("TestOut.pdf")); AcroFields af = stamper.getAcroFields(); af.setField("someField",somedata); stamper.close(); 2) Is there another/better tool for creating a template that can be converted to PDF? Again, thanks for any / all info. Regards, Rob -----Original Message----- From: Paulo Soares [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 3:57 PM To: Rob Dickey; itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Newbie to PDF APIs ? Trying to update fields... iText doesn't support forms created with Designer 7. Forms created with Acrobat 7 will work ok. ----- Original Message ----- From: "Rob Dickey" <[EMAIL PROTECTED]> To: <itext-questions@lists.sourceforge.net> Sent: Wednesday, November 23, 2005 11:20 PM Subject: [iText-questions] Newbie to PDF APIs ? Trying to update fields... > I've reviewed some of the samples that use the PDFStamper, AcroFields, > etc. > objects to programmatically update fields from a PDF template and stream > the > update to a new PDF. The samples work great. However, when I tried the > same > things against a PDF template I created using Adobe Designer, the fields > could not be referenced by name as done in the samples. It appears that > the > fields are embedded in a tree (I assume the Cos Layer). A debug statement > after instantiating the PDFStamper shows fields as follows: > > > > Fields info: > {TopmostSubform[0].#subform[0].#subform[10].#subform[16].#field1[1]=com.lowa > [EMAIL PROTECTED], > TopmostSubform[0].#subform[0].#subform[1].#subform[9].#field2[2]=com.lowagie > [EMAIL PROTECTED], etc. > > > > Code Excerpt: > > > > PdfReader reader = new PdfReader("TestTemplate.pdf"); > > PdfStamper stamper = new PdfStamper(reader, new > FileOutputStream("TestOut.pdf")); > > AcroFields form1 = stamper.getAcroFields(); > > System.out.println("Fields info: "+form1.getFields().toString()); > > // writer = PdfWriter.getInstance(document,new > FileOutputStream("bidNotice"+bidNotice.getBidNoticeId()+".pdf")); > > form1.setField("field1","Test1"); > > form1.setField("field2", "Test2"); > > stamper.close(); > > > > Again, sorry for the newbie kind-of-question; in reviewing the template > used > in the sample vs the template I created, my template certainly has more > involved in terms of tables. Embedded form fields, etc. Is there another > object(s) of iText I should use to traverse the document tree to get to > the > field nodes? The sample template PDF was "hierarchy flat" so the > references > to a specific field didn't involve subforms, etc. > > > > TIA for any info. > > > > Regards. > > > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions