DsPdfJS API - v9.1.0
    Preparing search index...

    Class StandardSecurityHandlerRev2

    Defines Standard Security Handler Revision 2. This handler uses RC4 encryption with key 40 bit length.

    Hierarchy (View Summary)

    Index

    Accessors

    • get accessType(): AccessType | null

      Gets the access type granted by this StandardSecurityHandler, or null. This property is initialized when a document is loaded.

      Returns AccessType | null

    • get allowCopyContent(): boolean

      Gets or sets whether the user can copy contents from the PDF document.

      Returns boolean

    • set allowCopyContent(value: boolean): void

      Gets or sets whether the user can copy contents from the PDF document.

      Parameters

      • value: boolean

      Returns void

    • get allowEditAnnotations(): boolean

      Gets or sets whether the user can edit annotations in the PDF document.

      Returns boolean

    • set allowEditAnnotations(value: boolean): void

      Gets or sets whether the user can edit annotations in the PDF document.

      Parameters

      • value: boolean

      Returns void

    • get allowEditContent(): boolean

      Gets or sets whether the user can edit the contents of the PDF document.

      Returns boolean

    • set allowEditContent(value: boolean): void

      Gets or sets whether the user can edit the contents of the PDF document.

      Parameters

      • value: boolean

      Returns void

    • get allowPrint(): boolean

      Gets or sets whether the user can print the PDF document.

      Returns boolean

    • set allowPrint(value: boolean): void

      Gets or sets whether the user can print the PDF document.

      Parameters

      • value: boolean

      Returns void

    • get id(): number

      Gets the reference to the object.

      Returns number

    • get ownerPassword(): string

      Gets or sets the password required to change permissions of a PDF document as a string. The two properties ownerPassword and ownerPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Returns string

    • set ownerPassword(value: string): void

      Gets or sets the password required to change permissions of a PDF document as a string. The two properties ownerPassword and ownerPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Parameters

      • value: string

      Returns void

    • get ownerPasswordBytes(): Uint8Array

      Gets or sets the password required to change permissions of a PDF document as a byte array. The two properties ownerPassword and ownerPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Returns Uint8Array

    • set ownerPasswordBytes(value: Uint8Array): void

      Gets or sets the password required to change permissions of a PDF document as a byte array. The two properties ownerPassword and ownerPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Parameters

      • value: Uint8Array

      Returns void

    • get passwordMatches(): PasswordMatches

      Gets a combination of flags that indicate how the password specified when loading the PDF matches the document's User and Owner passwords.

      Returns PasswordMatches

    • get revision(): number

      Gets the revision of this StandardSecurityHandler.

      Returns number

    • get userPassword(): string

      Gets or sets the password required to open a PDF document as a string. The two properties userPassword and userPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using userPasswordBytes.

      Returns string

    • set userPassword(value: string): void

      Gets or sets the password required to open a PDF document as a string. The two properties userPassword and userPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using userPasswordBytes.

      Parameters

      • value: string

      Returns void

    • get userPasswordBytes(): Uint8Array

      Gets or sets the password required to open a PDF document as a byte array. The two properties userPassword and userPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Returns Uint8Array

    • set userPasswordBytes(value: Uint8Array): void

      Gets or sets the password required to open a PDF document as a byte array. The two properties userPassword and userPasswordBytes allow to define the password as a string or as an array of bytes. According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so DsPdfJS cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this property.

      Parameters

      • value: Uint8Array

      Returns void

    Methods