Bruno Lowagie <bruno <at> lowagie.com> writes:

> 
> Hilbert Rémy (GFDI) wrote:
> 
> > Hi,
> >
> > I am using your java api to fill a pdf form automatically in a Web 
> > environment.
> >
> > So I writen some classes who fill a template.
> >
> > When I create the template with the Adobe acrobat 7.0 Professional the 
> > method “setField” does not work … (The fields are not setted).
> >
> > And when I create the PDF with another tool (for example OpenOffice) 
> > It’s work well …
> >
> > Do you have a solution for this problem ?
> >
> > Or do I use another Method to set a field in a pdf form ?
> >
> Chances are you aren't creating an AcroForm with Acrobat 7.0,
> but that you are creating an XFA form with LiveCycle.
> You have to look for the menu item that allows you to create
> forms the 'traditional way' in Acrobat.

I have never found a menu item to allow me to create the pre-7 forms. But I 
have developed a workaround. The actual field names wind up being fully 
qualified names with all of the XML entity names concatenated. Therefore, if 
the field name you are looking for is "Name", the form will 
contain "*****Name**" where the "*" represents the XML information. 

I am converting Word templates to PDF and I don't feel the desire to explicitly 
name all of the containers that are created to recreate the Word tables. 
Therefore, I am creating a hash map with the short name acting as a key for the 
huge name generated by Acrobat. This map is populated by going through the 
field collection when the template is loaded. The only real drawback is that 
the process relies on the substring function and therefore will run into 
trouble if one field id is a subset of another.

If someone can tell me how to just create the 6.X forms, it would simplify my 
life, but until then I can use this process.

I hope this helps someone.

Tony




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to