PdfFileOptionsPdfFileSecurity Property
Enables to specify owner password, user password and PDF file permissions

Namespace: GroupDocs.Viewer.Domain.Options
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 19.6
public PdfFileSecurity PdfFileSecurity { get; set; }

Property Value

Type: PdfFileSecurity
The following example demonstrates how to set owner password and permissions for printing.
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
PdfFileOptions options = new PdfFileOptions();
options.PdfFileSecurity = new PdfFileSecurity("owner password", string.Empty, PdfFilePermissions.Printing);

string guid = "document.doc";
FileContainer fileContainer = htmlHandler.GetPdfFile(guid, options);
See Also