Thanks, it works fine with the PdfReader.getPdfObject() !!

Luis

2006/1/19, Paulo Soares <[EMAIL PROTECTED]>:
That should work. It will return null or a PdfString. It's better to
wrap it in a PdfReader.getPdfObject() to resolve indirect references.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of Luis Catalino
> Sent: Wednesday, January 18, 2006 4:40 PM
> To: [email protected]
> Subject: [iText-questions] Get the default value of a PDF field
>
> Hello.
>
> How do I get the default value of a PDF field? I reached here:
>
> PdfStamper stp = new PdfStamper(reader, new
> FileOutputStream(tmpfile));
> AcroFields af = stp.getAcroFields();
> String fieldName = ...;
> ((PdfDictionary) af.getFieldItem("NumOptimus").merged.get(0))
>                     .get(PdfName.DV);
>
> I don't know if i'm going in the right way. How do I do this?
>
> Thanks,
>

Reply via email to