[]
DsPdfJS API / StandardSecurityHandler
Defines base class for Standard Security Handlers. These security handlers allow access permissions and up to two passwords to be specified for a document: an owner password and a user password.
get accessType():
AccessType|null
Gets the access type granted by this StandardSecurityHandler, or null. This property is initialized when a document is loaded.
AccessType | null
get id():
number
Gets the reference to the object.
number
get om():
ObjectManager
Gets the owner ObjectManager instance.
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.
string
set ownerPassword(
value):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.
string
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.
Uint8Array
set ownerPasswordBytes(
value):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.
Uint8Array
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.
get revision():
number
Gets the revision of this StandardSecurityHandler.
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.
string
set userPassword(
value):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.
string
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.
Uint8Array
set userPasswordBytes(
value):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.
Uint8Array
void
assignFrom(
source):void
Copies all property values from another object.
The source object.
void
SecurityHandlerBase.assignFrom
clone():
SecurityHandlerBase
Create copy of this SecurityHandlerBase.
The clone of this object.
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void