Is it possible to "rights-enable" a document by remove the XFA from it? Meaning a user can fill in a form and save it locally.
 
I found this code snippet on line and wondered if it would work:
...
PdfReader reader = new PdfReader("c:\\temp\\input.pdf");
PdfDictionary acro = (PdfDictionary)PdfReader.getPdfObject(reader.getCatalog().get(PdfName.ACROFORM));
acro.remove(new PdfName("XFA"));
PdfStamper stp = new PdfStamper(reader, new FileOutputStream("c:\\temp\\output.pdf"));
...
 
Thanks for the help.
 

Doug James
Software Engineer
Benefitfocus.com, Inc.

 

***************************************************************************************
BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is intended only for the individual or entity to which it is addressed and may contain information that is confidential and protected by law. Unauthorized review, use, disclosure, or dissemination of this communication or its contents in any way is prohibited and may be unlawful. If you are not the intended recipient or a person responsible for delivering this message to an intended recipient, please notify the original sender immediately by e-mail or telephone, return the original message to the original sender or to [EMAIL PROTECTED], and destroy all copies or derivations of the original message. Thank you. (BFeComNote Rev. 08/01/2005)
***************************************************************************************

Reply via email to