Hi, I'm a Java programmer working with a Pdf form that has a number of TextFields and radio buttons. My goal is to highlight all those fields that haven't been populated or checked. I'm able to highlight all the Text fields and the Signature fields by getting the AcroForms and then setting the background color if there is no text in it. Listed below is the code i'm using to achieve this. // filling in the form PdfStamper stamp1 = new PdfStamper(reader, new FileOutputStream(outFile)); AcroFields form1 = stamp1.getAcroFields(); HashMap hm = form1.getFields(); //test HashMap fields = form1.getFields(); for (Iterator i = fields.keySet().iterator(); i.hasNext();) { String name = (String)i.next(); AcroFields.Item item = (AcroFields.Item)fields.get(name); System.out.println("name ::"+name+" <===> item ::"+item); if (form1.getField(name).trim().equalsIgnoreCase(BLANK)) { form1.setFieldProperty(name,BG_COLOR, yellowHighlight,null); form1.setField(name, ""); } }
However, i cannot seem to set the background colors for the different radio buttons and checkboxes. I'm able to print out the various possible options for the radio button but am unable to set the background color for each of the individual items. Am using the code below to access the radio buttons. String[] s = form1.getAppearanceStates(name); if (s.length > 1) { System.out.println(name+"is a radio button and needs to be highlighted as well"); for (int k=0; k<s.length; k++) { System.out.println(":: Item ::"+k+":::"+s[k]); } Any Ideas as to how i can set the background colors for the radio button choices? Thanks, Satish -----Message Disclaimer----- This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [EMAIL PROTECTED] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation. Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message. ------------------------------------------------------- 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 iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions