PdfSecurityOptions

PdfSecurityOptions class

Options for encrypting and access permissions for a PDF document. PDF/A does not allow security setting.

class PdfSecurityOptions;

Constructors

NameDescription
constructor()The constructor of PdfSecurityOptions

Methods

MethodDescription
getUserPassword()Gets or sets the user password required for opening the encrypted PDF document.
setUserPassword(string)Gets or sets the user password required for opening the encrypted PDF document.
getOwnerPassword()Gets or sets the owner password for the encrypted PDF document.
setOwnerPassword(string)Gets or sets the owner password for the encrypted PDF document.
getPrintPermission()Indicates whether to allow to print the document.
setPrintPermission(boolean)Indicates whether to allow to print the document.
getModifyDocumentPermission()Indicates whether to allow to modify the contents of the document by operations other than those controlled by AnnotationsPermission, FillFormsPermission and AssembleDocumentPermission.
setModifyDocumentPermission(boolean)Indicates whether to allow to modify the contents of the document by operations other than those controlled by AnnotationsPermission, FillFormsPermission and AssembleDocumentPermission.
getAnnotationsPermission()Indicates whether to allow to add or modify text annotations, fill in interactive form fields.
setAnnotationsPermission(boolean)Indicates whether to allow to add or modify text annotations, fill in interactive form fields.
getFillFormsPermission()Indicates whether to allow to fill in existing interactive form fields (including signature fields), even if ModifyDocumentPermission is clear.
setFillFormsPermission(boolean)Indicates whether to allow to fill in existing interactive form fields (including signature fields), even if ModifyDocumentPermission is clear.
getExtractContentPermission()Indicates whether to allow to copy or otherwise extract text and graphics from the document by operations other than that controlled by AccessibilityExtractContent.
setExtractContentPermission(boolean)Indicates whether to allow to copy or otherwise extract text and graphics from the document by operations other than that controlled by AccessibilityExtractContent.
getAccessibilityExtractContent()Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).
setAccessibilityExtractContent(boolean)Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).
getAssembleDocumentPermission()Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if ModifyDocumentPermission is clear.
setAssembleDocumentPermission(boolean)Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if ModifyDocumentPermission is clear.
getFullQualityPrintPermission()Indicates whether to allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated.
setFullQualityPrintPermission(boolean)Indicates whether to allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated.
isNull()Checks whether the implementation object is null.

constructor()

The constructor of PdfSecurityOptions

constructor();

getUserPassword()

Gets or sets the user password required for opening the encrypted PDF document.

getUserPassword() : string;

Remarks

The owner password or user password will be required to open an encrypted PDF document for viewing.

The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document.

Opening the document with the correct owner password allows full access to the document.

Opening the document with the correct user password (or opening a document that does not have a user password) allows limited access as the permissions specified.

setUserPassword(string)

Gets or sets the user password required for opening the encrypted PDF document.

setUserPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

The owner password or user password will be required to open an encrypted PDF document for viewing.

The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document.

Opening the document with the correct owner password allows full access to the document.

Opening the document with the correct user password (or opening a document that does not have a user password) allows limited access as the permissions specified.

getOwnerPassword()

Gets or sets the owner password for the encrypted PDF document.

getOwnerPassword() : string;

Remarks

The owner password allows the user to open an encrypted PDF document without any access restrictions specified.

setOwnerPassword(string)

Gets or sets the owner password for the encrypted PDF document.

setOwnerPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

The owner password allows the user to open an encrypted PDF document without any access restrictions specified.

getPrintPermission()

Indicates whether to allow to print the document.

getPrintPermission() : boolean;

Remarks

Possibly not at the highest quality level, depending on whether FullQualityPrintPermission is also set.

setPrintPermission(boolean)

Indicates whether to allow to print the document.

setPrintPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Possibly not at the highest quality level, depending on whether FullQualityPrintPermission is also set.

getModifyDocumentPermission()

Indicates whether to allow to modify the contents of the document by operations other than those controlled by AnnotationsPermission, FillFormsPermission and AssembleDocumentPermission.

getModifyDocumentPermission() : boolean;

setModifyDocumentPermission(boolean)

Indicates whether to allow to modify the contents of the document by operations other than those controlled by AnnotationsPermission, FillFormsPermission and AssembleDocumentPermission.

setModifyDocumentPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAnnotationsPermission()

Indicates whether to allow to add or modify text annotations, fill in interactive form fields.

getAnnotationsPermission() : boolean;

Remarks

if ModifyDocumentPermission is also set, create or modify interactive form fields (including signature fields).

setAnnotationsPermission(boolean)

Indicates whether to allow to add or modify text annotations, fill in interactive form fields.

setAnnotationsPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

if ModifyDocumentPermission is also set, create or modify interactive form fields (including signature fields).

getFillFormsPermission()

Indicates whether to allow to fill in existing interactive form fields (including signature fields), even if ModifyDocumentPermission is clear.

getFillFormsPermission() : boolean;

setFillFormsPermission(boolean)

Indicates whether to allow to fill in existing interactive form fields (including signature fields), even if ModifyDocumentPermission is clear.

setFillFormsPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getExtractContentPermission()

Indicates whether to allow to copy or otherwise extract text and graphics from the document by operations other than that controlled by AccessibilityExtractContent.

getExtractContentPermission() : boolean;

setExtractContentPermission(boolean)

Indicates whether to allow to copy or otherwise extract text and graphics from the document by operations other than that controlled by AccessibilityExtractContent.

setExtractContentPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAccessibilityExtractContent()

Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).

getAccessibilityExtractContent() : boolean;

setAccessibilityExtractContent(boolean)

Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).

setAccessibilityExtractContent(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAssembleDocumentPermission()

Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if ModifyDocumentPermission is clear.

getAssembleDocumentPermission() : boolean;

setAssembleDocumentPermission(boolean)

Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if ModifyDocumentPermission is clear.

setAssembleDocumentPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getFullQualityPrintPermission()

Indicates whether to allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated.

getFullQualityPrintPermission() : boolean;

Remarks

When it is clear (and PrintPermission is set), printing is limited to a low level representation of the appearance, possibly of degraded quality.

setFullQualityPrintPermission(boolean)

Indicates whether to allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated.

setFullQualityPrintPermission(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

When it is clear (and PrintPermission is set), printing is limited to a low level representation of the appearance, possibly of degraded quality.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;