The Permissions class provides constants that represent different permissions that can be applied to a PDF document in the GroupDocs.Viewer component. These permissions control the actions that can be performed on the PDF document, such as printing, copying text, modifying annotations, and more.
Example usage:
int permissions = Permissions.DENY_PRINTING | Permissions.DENY_MODIFICATION;
final Security security = new Security();
security.setPermissions(permissions);
final PdfViewOptions pdfViewOptions = new PdfViewOptions();
pdfViewOptions.setSecurity(security);
try (Viewer viewer = new Viewer("document.pdf")) {
viewer.view(pdfViewOptions);
// Use the viewer object for further operations
}