docs/global.html
Source:
Adds XMP formatted metadata to PDF.
WARNING: Passing raw XML is potentially insecure! Always sanitize user input before passing it to this function!
| Name | Type | Description |
|---|---|---|
metadata | string |
The actual metadata to be added. The interpretation of this parameter depends on the second parameter.
|
| rawXmlOrNamespaceUri | boolean | string | undefined |
If a string is passed it sets the namespace URI for the metadata and the metadata shall be stored as XMP simple value. The last character should be a slash or hash.
If this argument is omitted, a string is passed, or false is passed, the metadata argument will be XML-escaped before including it in the PDF.
If true is passed, the metadata argument will be interpreted as raw XMP and will be included verbatim in the PDF. The passed metadata must be complete (including surrounding xmpmeta and RDF tags).
|
jsPDF-instance
Type jsPDF
Source:
Initializes encryption settings
var security = new PDFSecurity(["print"])
| Name | Type | Description |
|---|---|---|
permissions | Array |
Permissions allowed for user, "print", "modify", "copy" and "annot-forms".
|
| userPassword | String |
Permissions apply to this user. Leaving this empty means the document is not password protected but viewer has the above permissions.
|
| ownerPassword | String |
Owner has full functionalities to the file.
|
| fileId | String |
As hex string, should be same as the file ID in the trailer.
|
Source:
Returns an encryptor function which can take in a byte string and returns the encrypted version
out("stream");
encryptor = security.encryptor(object.id, 0);
out(encryptor(data));
out("endstream");
| Name | Type | Description |
|---|---|---|
objectId | number | |
generation | number |
Not sure what this is for, you can set it to 0
|
Type function
Source:
Converts a hex string to a byte string
| Name | Type | Description |
|---|---|---|
hex | String |
Hex string
|
Type String
Source:
Breaks down a 4-byte number into its individual bytes, with the least significant bit first
| Name | Type | Description |
|---|---|---|
data | number |
32-bit number
|
Type Array
Source:
Helper function that maps ArrayBufferViews to ArrayBuffers Used by BlobBuilder constructor and old browsers that didn't support it in the Blob constructor.
Source:
License:
Source:
Computes the 'O' field in the encryption dictionary
| Name | Type | Description |
|---|---|---|
paddedUserPassword | String |
Byte string of padded user password
|
| paddedOwnerPassword | String |
Byte string of padded owner password
|
Type String
Source:
Converts a byte string to a hex string
| Name | Type | Description |
|---|---|---|
key | string |
Byte string of encryption key
|
| data | string |
Byte string of data to be encrypted
|
Encrypted string
Type string
Source:
License:
Source:
Author:
License:
A class to parse color values
Source:
| Name | Type | Description |
|---|---|---|
: | Object |
|
Source:
Converts a byte string to a hex string
| Name | Type | Description |
|---|---|---|
byteString | String |
Byte string
|
Type String
Source:
Convert string to PDF Name Object. Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object
| Name | Type | Description |
|---|---|---|
str |
Source:
| Name | Type | Description |
|---|---|---|
pdf | jsPDF |
Source:
{Matrix|undefined} matrix {Number|undefined} xStep {Number|undefined} yStep {Array.|undefined} boundingBox