PdfEncryptionDetails.OwnerPassword
PdfEncryptionDetails OwnerPassword property. Specifies the owner password for the encrypted PDF document.
PdfEncryptionDetails.OwnerPassword property
Specifies the owner password for the encrypted PDF document.
public string OwnerPassword { get; set; }
Remarks
The owner password allows the user to open an encrypted PDF document without any access restrictions specified in Permissions
.
The owner password cannot be the same as the user password.
Examples
Shows how to specify PDF document encryption details.
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.EncryptionDetails = new PdfEncryptionDetails("userPass", "1234", PdfPermissions.Printing);
// Change permissions and password after creation of PdfEncryptionDetails object.
pdfSaveOptions.EncryptionDetails.OwnerPassword = "12345";
pdfSaveOptions.EncryptionDetails.UserPassword = "123";
pdfSaveOptions.EncryptionDetails.Permissions = PdfPermissions.ModifyAnnotations | PdfPermissions.DocumentAssembly;
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "PdfSaveOptions.EncryptionDetails.pdf", pdfSaveOptions)
.Execute();
See Also
- class PdfEncryptionDetails
- namespace Wordize.Saving
- assembly Wordize