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, > ------------------------------------------------------- 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://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
