I would start by doing it manually with Adobe Acrobat and then looking at the output PDF in RUPS. Then work backwards to the code...
-----Original Message----- From: Larry Evans [mailto:[email protected]] Sent: Wednesday, March 14, 2012 12:43 PM To: [email protected] Subject: Re: [iText-questions] Howto get PdfFormField from AcroFields and field name On 03/04/12 12:43, Larry Evans wrote: > On 03/04/12 10:32, Larry Evans wrote: > [snip] >> However, what I need is to get a PdfFormField from and AcroFields >> instance and a field name. I then need to use that PdfFormField to >> specify an action for the field. >> >> The AcroFields class does have a method: >> >> http://api.itextpdf.com/itext/com/itextpdf/text/pdf/AcroFields.html#g >> etFieldItem%28java.lang.String%29 >> >> however, looking at the AcrodFields.Item class shows nothing, AFAICT, >> that will produce a PdfFormField which I could then use to set some >> action for the field. > [snip] > > A brief look here: > > http://www.itextpdf.com/examples/iia.php?id=238 > > suggests maybe a way to use AcroFields.Item to set the action for a > field. > Apparently, attaching an action to an f1040.pdf field as not as easy is copy/past from that example. With the attached, which is AddJavaScriptToForm.java modified to use f1040.pdf as the form to which an action is to be added, nothing happens when the "Your first name and initial" field is modified. So, how does one figure out how to add an action to a field on the f1040 form? TIA. -Larry ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
