[]
DsPdfJS API / StandardSecurityHandlerRev6
Represents Standard Security Handler Revision 6. This handler always use AES encryption with key length of 256 bit, it is described in PDF 2.0 specification.
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
StandardSecurityHandlerRev5.accessType
get allowCopyContent():
boolean
Gets or sets whether the user can copy contents from the PDF document.
boolean
set allowCopyContent(
value):void
Gets or sets whether the user can copy contents from the PDF document.
boolean
void
StandardSecurityHandlerRev5.allowCopyContent
get allowEditAnnotations():
boolean
Gets or sets whether the user can edit annotations in the PDF document.
boolean
set allowEditAnnotations(
value):void
Gets or sets whether the user can edit annotations in the PDF document.
boolean
void
StandardSecurityHandlerRev5.allowEditAnnotations
get allowEditContent():
boolean
Gets or sets whether the user can edit the contents of the PDF document.
boolean
set allowEditContent(
value):void
Gets or sets whether the user can edit the contents of the PDF document.
boolean
void
StandardSecurityHandlerRev5.allowEditContent
get allowPrint():
boolean
Gets or sets whether the user can print the PDF document.
boolean
set allowPrint(
value):void
Gets or sets whether the user can print the PDF document.
boolean
void
StandardSecurityHandlerRev5.allowPrint
get copyContent():
boolean
Gets or sets a value indicating whether a document's content can be copied or extracted.
boolean
set copyContent(
value):void
Gets or sets a value indicating whether a document's content can be copied or extracted.
boolean
void
StandardSecurityHandlerRev5.copyContent
get copyContentAccessibility():
boolean
Gets or sets a value used to determine whether content could be extracted for the purposes of accessibility. Note however that this restriction has been deprecated in PDF 2.0, which states that PDF readers shall ignore this bit. The default value of this property is true, and it should not be changed.
boolean
set copyContentAccessibility(
value):void
Gets or sets a value used to determine whether content could be extracted for the purposes of accessibility. Note however that this restriction has been deprecated in PDF 2.0, which states that PDF readers shall ignore this bit. The default value of this property is true, and it should not be changed.
boolean
void
StandardSecurityHandlerRev5.copyContentAccessibility
get editingPermissions():
EditingPermissions
Gets or sets a value controlling how a document can be edited.
set editingPermissions(
value):void
Gets or sets a value controlling how a document can be edited.
void
StandardSecurityHandlerRev5.editingPermissions
get encryptionAlgorithm():
number
Gets or sets a value indicating whether streams should be encrypted.
number
set encryptionAlgorithm(
value):void
Gets or sets a value indicating whether streams should be encrypted.
number
void
StandardSecurityHandlerRev5.encryptionAlgorithm
get encryptionKeyLength():
number
Gets or sets the length of the encryption key, in bits. The value must be a multiple of 8, in the range from 40 to 128. IMPORTANT NOTE: StandardSecurityHandlerRev4 can use RC4 or AES encryption, and according to specification, with RC4 any key length in the range from 40 to 128 can be used. But tests show that current/recent versions of Adobe Acrobat Reader DC and Adobe Acrobat Pro DC cannot handle files encrypted with RC4 if the key length is not equal to 128. Older versions of Acrobat Reader handle such files without issues, so it looks like a bug in the newer versions of Acrobat Reader. So it is recommended that StandardSecurityHandlerRev3 is used in cases when RC4 encryption with key length other than 128 is required.
number
set encryptionKeyLength(
value):void
Gets or sets the length of the encryption key, in bits. The value must be a multiple of 8, in the range from 40 to 128. IMPORTANT NOTE: StandardSecurityHandlerRev4 can use RC4 or AES encryption, and according to specification, with RC4 any key length in the range from 40 to 128 can be used. But tests show that current/recent versions of Adobe Acrobat Reader DC and Adobe Acrobat Pro DC cannot handle files encrypted with RC4 if the key length is not equal to 128. Older versions of Acrobat Reader handle such files without issues, so it looks like a bug in the newer versions of Acrobat Reader. So it is recommended that StandardSecurityHandlerRev3 is used in cases when RC4 encryption with key length other than 128 is required.
number
void
StandardSecurityHandlerRev5.encryptionKeyLength
get encryptMetadata():
boolean
Gets or sets a value indicating whether the document-level metadata stream is to be encrypted.
boolean
set encryptMetadata(
value):void
Gets or sets a value indicating whether the document-level metadata stream is to be encrypted.
boolean
void
StandardSecurityHandlerRev5.encryptMetadata
get encryptStreams():
boolean
Gets or sets a value indicating whether streams should be encrypted.
boolean
set encryptStreams(
value):void
Gets or sets a value indicating whether streams should be encrypted.
boolean
void
StandardSecurityHandlerRev5.encryptStreams
get encryptStrings():
boolean
Gets or sets a value indicating whether strings should be encrypted.
boolean
set encryptStrings(
value):void
Gets or sets a value indicating whether strings should be encrypted.
boolean
void
StandardSecurityHandlerRev5.encryptStrings
get id():
number
Gets the reference to the object.
number
StandardSecurityHandlerRev5.id
get om():
ObjectManager
Gets the owner ObjectManager instance.
StandardSecurityHandlerRev5.om
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
StandardSecurityHandlerRev5.ownerPassword
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
StandardSecurityHandlerRev5.ownerPasswordBytes
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.
StandardSecurityHandlerRev5.passwordMatches
get printingPermissions():
PrintingPermissions
Gets or sets a value controlling how a document can be printed.
set printingPermissions(
value):void
Gets or sets a value controlling how a document can be printed.
void
StandardSecurityHandlerRev5.printingPermissions
get revision():
number
Gets the revision of this StandardSecurityHandler.
number
StandardSecurityHandlerRev5.revision
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
StandardSecurityHandlerRev5.userPassword
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
StandardSecurityHandlerRev5.userPasswordBytes
staticcreate(om?):StandardSecurityHandlerRev6
Creates a new StandardSecurityHandlerRev6.
ObjectManager that controls the lifetime of the StandardSecurityHandlerRev6.
StandardSecurityHandlerRev6
StandardSecurityHandlerRev5.create
assignFrom(
source):void
Copies all property values from another object.
The source object.
void
StandardSecurityHandlerRev5.assignFrom
clone():
SecurityHandlerBase
Create copy of this SecurityHandlerBase.
The clone of this object.
StandardSecurityHandlerRev5.clone
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
StandardSecurityHandlerRev5.free
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void