XFA fields support lock/read-only attributes as well. You need to change XML in the XFA template. Same idea as form filling the XFA, but different place in the grammar.
-----Original Message----- From: Adam Carless [mailto:adam.carl...@hansard.com] Sent: Monday, May 17, 2010 11:36 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Encryption and XFA Forms Hi Leonard, > You are directly writing XFA form information (via fillXfaForm) > BUT_ then you use the acroFields APIs to change the lock state > - you can NOT mix these two! Either you are working with XFA > _OR_ you are working with AcroForms. It's like cross the > streams.... That does seem to be what I'm doing, and it doesn't make any sense to me either. All I can say is that it's working, so I assumed it was just a case where iText says one thing, but actually does another. If it doesn't make any sense to you, could you clarify what you meant in your reply saying: > Set the locked attributes on the fields. That comment started me looking into what attributes were available on the individual fields, which is how I came up with the working code I've given, after much trial and error with the various undocumented constants and parameters available for the various field types. However, I can't find any "locked" parameter, attribute, property, etc on any of the Acroform fields or XFA fields. So if there's a better way, I'm happy to listen - how would you "set the locked attributes on the fields"? Thanks, Adam The contents of this message and any attachments are confidential and are intended for the use of the persons to whom it is addressed. If you are not the intended recipient, you should not copy, forward, use or alter the message in any way, nor disclose its contents to any other person. Please notify the sender immediately and delete the e-mail from your system, if you so wish you can contact us on +44 1624 688000. The sender is not responsible for any alterations that may have occurred without authorisation. Any files attached to this email will have been checked by us with virus detection software before transmission. You should carry out your own virus checks before opening any attachments, as we do not accept any liability for loss or damage which may be caused by viruses. For information regarding company registration please visit the contact page at www.hansard.com ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/