PdfPermissions enumeration

PdfPermissions enumeration

Specifies the operations that are allowed to a user on an encrypted PDF document.

Members

NameDescription
DisallowAllDisallows all operations on the PDF document. This is the default value.
AllowAllAllows all operations on the PDF document.
ContentCopyCopy or otherwise extract text and graphics from the document by operations other than that controlled by PdfPermissions.ContentCopyForAccessibility.
ContentCopyForAccessibilityExtract text and graphics (in support of accessibility to users with disabilities or for other purposes).
ModifyContentsModify the contents of the document by operations other than those controlled by PdfPermissions.ModifyAnnotations, PdfPermissions.FillIn, and PdfPermissions.DocumentAssembly.
ModifyAnnotationsAdd or modify text annotations, fill in interactive form fields, and, if PdfPermissions.ModifyContents is also set, create or modify interactive form fields (including signature fields).
FillInFill in existing interactive form fields (including signature fields), even if PdfPermissions.ModifyContents is clear.
DocumentAssemblyAssemble the document (insert, rotate, or delete pages and create document outline items or thumbnail images), even if PdfPermissions.ModifyContents is clear.
PrintingPrint the document (possibly not at the highest quality level, depending on whether PdfPermissions.HighResolutionPrinting is also set).
HighResolutionPrintingPrint the document to a representation from which a faithful digital copy of the PDF content could be generated, based on an implementation-dependent algorithm. When this flag is clear (and PdfPermissions.Printing is set), printing shall be limited to a low-level representation of the appearance, possibly of degraded quality.

Examples

Shows how to set permissions on a saved PDF document.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

builder.writeln("Hello world!");

// Extend permissions to allow the editing of annotations.
let encryptionDetails =
  new aw.Saving.PdfEncryptionDetails("password", '', aw.Saving.PdfPermissions.ModifyAnnotations | aw.Saving.PdfPermissions.DocumentAssembly);

// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
let saveOptions = new aw.Saving.PdfSaveOptions();
// Enable encryption via the "EncryptionDetails" property.
saveOptions.encryptionDetails = encryptionDetails;

// When we open this document, we will need to provide the password before accessing its contents.
doc.save(base.artifactsDir + "PdfSaveOptions.EncryptionPermissions.pdf", saveOptions);

See Also