Radio buttons can have any value. You must have that info. Open the file in
Acrobat and look at the names.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: Ben Temperton [SMTP:[EMAIL PROTECTED]
> Sent: Tuesday, September 23, 2003 11:26
> To: '[EMAIL PROTECTED]'
> Subject: [iText-questions] Using PdfStamper with radio buttons
>
> I'm currently reading in an xml file showing form field values, and a FDF
> form. I am wishing to populate the form with the values, and then stamp it
> to make it flat.
>
> The code is:
>
> File outputFile = new File("testfile.pdf");
> outputFile.createNewFile();
> PdfReader reader = new PdfReader("form.pdf");
> FileOutputStream stream = new FileOutputStream(outputFile);
> PdfStamper stamp = new PdfStamper(reader, stream);
> AcroFields form = stamp.getAcroFields();
>
> Element root = document.getDocumentElement();
> NodeList nodeList = root.getChildNodes();
> for (int i=0; i<nodeList.getLength(); i++)
> {
> Node child = nodeList.item(i);
> String fieldName = child.getNodeName();
> String fieldValue = getText(child);
> form.setField(fieldName, fieldValue);
> }
>
> stamp.setFormFlattening(true);
> stamp.close();
> stream.close();
>
> However, my form contains radio buttons which I need to populate. I am
> however unsure as to what value fieldValue should have in order to
> populate
> the radio button. I've tried "1", "true", "nameOfButton" and none of them
> populate it.
>
> Any assistance would be most welcome.
>
> Cheers,
>
> Ben
>
> The Company gives no warranty as to the accuracy or completeness of
> electronic mail messages sent over the Internet and accepts no
> responsibility for changes made after it was sent. Any opinion expressed
> in
> this email may be personal to the author, may not necessarily reflect the
> opinions of the Company or its affiliates and may be subject to change
> without notice.
> The information contained in this communication is confidential and/or
> proprietary business or technical data. If you are not the intended
> recipient, you are hereby notified that any dissemination, copying or
> distribution of this communication, or the taking of any action in
> reliance
> on the contents of this communication, is strictly prohibited. If you
> have
> received this communication in error, please immediately notify us
> electronically by return message, and delete or destroy all copies of this
> communication.
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions