Thanks Paulo.
I have added the field dictionary to the 'FIELDS' array. But the newly created dictionary is added as direct object and the fields are not visible.
At present, I am adding PdfIndirectReference object (got using
PdfReader.getPRIndirectReference) to the 'FIELDS' dictionary. How to create an indirect reference using iText?
Please help.
@psoaresw>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
If you use PdfStamper.addAnnotation() there are limitations on what the
field naming can be but if you go directly to PdfReader it's possible to
create a field with, for example, TextField and insert it as a kid or in any
other place.
Paulo
----- Original Message -----
From: "Pradeepa Evangovan" <
pelangovan@filelogix.net
>
To: <
itext-questions@lists.sourceforge.net>
Sent: Tuesday, August 07, 2007 3:42 PM
Subject: [iText-questions] Add new field dictionary to the existing pdf
> Hi,
> I have gone through the PdfStamper API and Pdf reference... I am
> able to add form fields in the existing pdf, change the kids and parent
> properties of the existing form fields.
> Is it possible to add a new field dictionary to the existing pdf?
> I
> have created a field dictionary using "new PdfDictionary(PdfName.TX
)" and
> set the attributes for that field dictionary. Is it possible to add this
> field dictionary to the existing pdf using PdfStamper.
> I apologise if this question has been answered already. I am not able
> to
> find the solution for this problem.
>
> Thanks in advance,
> Pradeepa