Hello all, I'm renaming a few fields with AcroFields.renameField, but I am unable to set them as ReadOnly when I iterate over all of the AcroFields and attempt to lock each one. The fields that are not renamed can be locked just fine, however. I would appreciate any help you could offer on how to lock the AcroFields that have been renamed.
The code below demonstrates how I'm renaming the AcroFields and then locking them. Thanks, Jim for (Iterator i = reader.getAcroForm().getFields().iterator(); i .hasNext();) { PRAcroForm.FieldInformation field = (PRAcroForm.FieldInformation) i .next(); field.getInfo(); formFields.renameField(field.getName(), field.getName().concat( stringToAppend)); } //insert values into renamed AcroFields ... AcroFields formFields = stamper.getAcroFields(); // Lock the fields for (Iterator i = reader.getAcroForm().getFields().iterator(); i .hasNext();) { PRAcroForm.FieldInformation field = (PRAcroForm.FieldInformation) i .next(); field.getInfo(); formFields.setFieldProperty(field.getName(), "setfflags", PdfFormField.FF_READ_ONLY, null); } ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions