Set the locked attributes on the fields. -----Original Message----- From: Adam Carless [mailto:adam.carl...@hansard.com] Sent: Friday, May 14, 2010 11:12 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Encryption and XFA Forms
> Were you using the same permission flags with all four variants? > > Yes? Yes, I used the same permissions throughout - the only permission allowed was ALLOW_PRINTING (which is our standard setting for this kind of generated PDF). In case it's important, the encryption strength is ENCRYPTION_AES_128 > In that case, I'm going to guess you need to add the > PdfWriter.ALLOW_FILL_IN flag to your setEncryption call. I also suggest > you add ALLOW_COPY (text selection/copy/paste from the PDF) on general > principles. Ahh, thanks for that, I hadn't realised the permissions would be applied to the itext manipulations done on the PDF, I thought they came into force when the stamper was closed. I also hadn't realised what the ALLOW_FILL_IN permission was for. I've added the new permission to the list and it looks like we're a step closer. ALLOW_FILL_IN does allow our code to fill in the XFA form. However, once secured, the final PDF also allows users to edit the form fields. What I'm hoping to do is open the unsecured PDF, fill in the XFA fields, and produce a filled in, secured PDF, which subsequent viewers cannot edit (or at least cannot save/print those edits). Is there anyway to do that? Or are the options only secure but unfilled XFA fields, or filled but unsecured XFA fields? Thanks again for the help, Adam Carless 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/