EVO HTML to PDF Converter allows a fine control of the PDF security properties, password protection and digital signatures. You can set protection restrictions on the generated PDF document like disabling printing, editing, copying or filling form fields.
There are two types of passwords you can set on a PDF document: a user password and an owner password. When you open the generated document with the user password the restrictions you have set on document are active. When you open the generated PDF document with owner password the restrictions you have set on the document are disabled and the document can be edited.
Code Sample - Setting the PDF Document Security Options
| C# | |
|---|---|
// create the PDF converter PdfConverter pdfConverter = new PdfConverter(); // set document restrictions pdfConverter.PdfSecurityOptions.CanCopyContent = true; pdfConverter.PdfSecurityOptions.CanEditContent = true; pdfConverter.PdfSecurityOptions.CanFillFormFields = true; pdfConverter.PdfSecurityOptions.CanPrint = true; pdfConverter.PdfSecurityOptions.CanEditAnnotations = true; pdfConverter.PdfSecurityOptions.CanAssembleDocument = true; // set password protection pdfConverter.PdfSecurityOptions.UserPassword = "user"; pdfConverter.PdfSecurityOptions.OwnerPassword = "owner"; //create a PDF document Document document = new Document(); // set document restrictions document.Security.CanCopyContent = true; document.Security.CanEditContent = true; document.Security.CanFillFormFields = true; document.Security.CanPrint = true; document.Security.CanEditAnnotations = true; document.Security.CanAssembleDocument = true; // set password protection document.Security.UserPassword = "user"; document.Security.OwnerPassword = "owner"; | |