Security Properties

Security Properties

Forum member · Mar 28, 2012
How can i read the security properties from my source document and pass them to the target document? Dim PDFDoc As New PdfDocument(SourceDocPath) Dim DocNew As MergeDocument = New MergeDocument() DocNew.Append(PDFDoc, 1, 1) DocNew.Draw(TargetDocFilePath) The new document(DocNew) should habe the same security options as the original document. The original document has form field which are not editable. Inside the new document the form fild should also be not editable. Thanks

Re: Security Properties

Support · Mar 28, 2012
Hello, It is not possible to read the security properties of the existing PDF document. But if you want to make the form fields not editable using the security objects available in the Enterprise edition of Merger you can use the following sample code. Using StandardSecurity object to make the form fields read-only. MergeDocument document = new MergeDocument("fw9AcroForm_03.pdf"); StandardSecurity security = new StandardSecurity(); security.AllowUpdateAnnotsAndFields = false; security.AllowEdit = false; document.Security = security; document.Draw("test.pdf"); Using HighSecurity object to make the form fields read-only. MergeDocument document = new MergeDocument("fw9AcroForm_03.pdf"); HighSecurity security = new HighSecurity(); security.AllowFormFilling = false; security.AllowUpdateAnnotsAndFields = false; security.AllowEdit = false; document.Security = security; document.Draw("test.pdf"); Thanks, ceTe Software Support Team.