|
FoxitPDFSDKforWeb
7.1.1
Foxit PDF SDK for Web
|
Public Member Functions | |
| addAnnot (pageIndex, annotJson) | |
| Add an annotation into a specified page. More... | |
| addAnnotGroup (pageIndex, annotJsons, headerIndex) | |
| Add a group annotation. More... | |
| applyRedaction () | |
| Apply redaction in marked areas: remove the text or graphics under marked areas permanently. More... | |
| createRootBookmark () | |
| Create the root bookmark of the document. More... | |
| drmEncrypt (options) | |
| exportAnnotsToFDF (fileType=0) | |
| Export annotation data in a document to a file. More... | |
| exportAnnotsToJSON () | |
| Export the document's annotation data to Json. More... | |
| exportFormToFile (fileType=0) | |
| Export document form data to file. More... | |
| extractPages (pageRange) | |
| Export the given page(s) from the current document. More... | |
| flatten (option) | |
| Flatten all annotations and interactive form fields in a PDF. More... | |
| getAnnots () | |
| Get an array of all annotations of the current document. More... | |
| getBookmarksJson () | |
| Get the document's bookmarks to JSON format. More... | |
| getId () | |
| Gets the id of the PDF document. More... | |
| getLayerNodesJson () | |
| Get the document's layer nodes. More... | |
| getMetadata () | |
| Get metadata of PDF document. More... | |
| getPageAnnots (index) | |
| Get all annotations in a specified page by page index. More... | |
| getPageByIndex (index) | |
| Get the document page. More... | |
| getPageCount () | |
| Gets the number of document pages. More... | |
| getPasswordType () | |
| Get the type of current used password. More... | |
| getPDFForm () | |
| Get form object of PDF Document. More... | |
| getPermission () | |
| Get user access permissions. If it is the owner of the document, then 4294967292 is put back to indicate full permissions. . More... | |
| getPermissions () | |
| Get user access permissions. If it is the owner of the document, then 4294967292 is put back to indicate full permissions. . More... | |
| getRootBookmark () | |
| Get the root bookmark of the document. More... | |
| getStream (writeChunk) | |
| Gets a PDF file stream that can be used to download documents. More... | |
| getTextSearch (pattern, flags) | |
| get doc text search object More... | |
| getUserPermissions () | |
| importAnnotsFromFDF (fdf) | |
| Import data from an FDF file specified by array buffer. More... | |
| importAnnotsFromJSON (annotsJson) | |
| Import data from Json. More... | |
| importFormFromFile (file, isXML=false) | |
| Import form data from an FDF file specified by array buffer. More... | |
| insertPage (pageIndex, width, height) | |
| Insert a new blank PDF page to document, by index. More... | |
| insertPages ({destIndex, file, password="", flags=0, layerName="", startIndex, endIndex}) | |
| Start to import pages from another PDF document. More... | |
| loadPDFForm () | |
| Load form data of PDF document. More... | |
| makeRedactByPages (pages) | |
| Mark pages which are to be redacted. More... | |
| movePageTo (pageIndex, destIndex) | |
| Move a specified page to a new index position. More... | |
| removePage (pageIndex) | |
| Remove a PDF page by page index. More... | |
| setLayerNodeVisiable (layerId, visiable) | |
| Set the visibility of a specified layer node. More... | |
| setMetadataValue (key, value) | |
| Set metadata value. More... | |
| setPasswordAndPermission (userPassword, ownerPassword, permission=0xfffffffc, cipher=cipherType.AES256, isEncryptMetaData=true) | |
| Set document password and permission. More... | |
PDF document object
|
inline |
Add an annotation into a specified page.
| pageIndex | {number} Specifies target page. |
| annotJson | {object} Annotation's json object. |
|
inline |
Add a group annotation.
| pageIndex | {number} - Specifies target page. |
| annotJsons | {object} - Annotation's json object. |
| headerIndex | {number} - Indicates the header annotation's index. |
|
inline |
Apply redaction in marked areas: remove the text or graphics under marked areas permanently.
|
inline |
Create the root bookmark of the document.
|
inline |
This class represents a Foxit DRM(Digital Right Management) security handler, used for Foxit DRM encryption.
| options | {object} |
| options.isEncryptMetadata | {boolean} A boolean value to decide whether to encrypt metadata or not. true means to encrypt metadata, and false means not to encrypt metadata. |
| options.subFilter | {string} The sub filter of PDF document. |
| options.cipher | {number} Cipher type. Please refer to values starting from Cipher_Type::cipherRC4 and this should be one of these values except Cipher_Type::cipherNone. |
| options.keyLength | {number} The key length, in bytes. For Cipher_Type::cipherRC4 cipher, this value should be between 5 and 16. For Cipher_Type::cipherAES cipher, this value should be 16 or 32. |
| options.isOwner | {boolean} A boolean value to decide whether current user is owner or not. true means current user is owner, and false means current user is not owner. |
| options.userPermissions | {number} The user permissions. Please refer to values starting from User_Permissions::print and this can be one or combination of these values. |
| options.fileId | {string} The file identity string. |
| options.initialKey | {string} The user specified initial key for encryption. |
| [options.values] | {object} Set the DRM value for a specified parameter. A parameter string as the key name. It should not be an empty string. Followings are pre-defined key names: Issuer: issuer name. Creator: creator of this file. FileID: file ID. FlowCode: flow code for application control. Order: order number. User: user name. ServiceURL: service URL for remote server. Vender: vender name. |
|
inline |
Export annotation data in a document to a file.
| fileType | {number} - Specify data file type: 0 for FDF, 1 for XFDF; The default is 0. |
|
inline |
Export the document's annotation data to Json.
|
inline |
Export document form data to file.
| fileType | {number} - Specify data file type: 0 for FDF, 1 for XFDF, 2 for XML; The default is 0. |
|
inline |
Export the given page(s) from the current document.
| pageRange | {Array} - A two-dimensional array of page numbers to extract. |
|
inline |
Flatten all annotations and interactive form fields in a PDF.
| {*} | option |
| option | {number} - Flatten type: e_FlattenAll = 0, e_FlattenNoAnnot = 0x0001, e_FlattenNoFormControl = 0x0002. 0x0000 means flatten all annotations and interactive form. 0x0001 means flatten all interactive form. 0x0002 means flatten all annotations. |
|
inline |
Get an array of all annotations of the current document.
|
inline |
Get the document's bookmarks to JSON format.
|
inline |
Gets the id of the PDF document.
|
inline |
Get the document's layer nodes.
|
inline |
Get metadata of PDF document.
|
inline |
Get all annotations in a specified page by page index.
| index | {number} - page index |
|
inline |
Get the document page.
| index | {number} - Access 0 to this.getPageCount() - 1 |
|
inline |
Gets the number of document pages.
|
inline |
Get the type of current used password.
|
inline |
Get form object of PDF Document.
|
inline |
Get user access permissions.
If it is the owner of the document, then 4294967292 is put back to indicate full permissions.
.
|
inline |
Get user access permissions.
If it is the owner of the document, then 4294967292 is put back to indicate full permissions.
.
|
inline |
Get the root bookmark of the document.
|
inline |
Gets a PDF file stream that can be used to download documents.
| writeChunk | {Function} - Callbacks in the form of fragment flows: function ({arrayBuffer, offset, size}) {} - arrayBuffer: fragment stream, offset: fragment offset, size: fragment size |
|
inline |
get doc text search object
| pattern | {string} - Specifies word to search. |
| flags | {number} - Refer to the following values, which can be one or a combination of these values. 0: No special searching options. 1: If set, match the case of keyword when searching. 2: If set, match the whole word of keyword when searching. 4: If set, match the key word consecutively when searching. For example, "CC" will be matched twice in "CCC". |
|
inline |
Get user access permissions.
|
inline |
Import data from an FDF file specified by array buffer.
| fdf | {File|Blob|ArrayBuffer|TypeArray|ViewData} - Specify fdf file's stream. |
|
inline |
Import data from Json.
| annotsJson | {object[]} - Specify annots' json array. |
|
inline |
Import form data from an FDF file specified by array buffer.
| file | {File|Blob|ArrayBuffer|TypeArray|ViewData} - Specify fdf file's stream. |
| isXML | {boolean} - Indicate wheather is a xml file, default is false. |
|
inline |
Insert a new blank PDF page to document, by index.
| pageIndex | {number} - The page index for new page. |
| width | {number} - Width of new page. |
| height | {number} - Height of new page. |
|
inline |
Start to import pages from another PDF document.
| options.destIndex | {number} - A page index in current PDF document. |
| options.file | {File|Blob|ArrayBuffer|TypeArray|ViewData} - Specify PDF file's stream where pages will be exported from. |
| options.password | {string} - Specify document's password. It can be left empty. |
| options.flags | {number} - Options for importing pages.0:Import pages normally.1:Import pages with layers.2:Import pages without cloning stream objects into memory.Default value:0. |
| options.layerName | {string} - The name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application.If parameter flags is 1, this should not be empty and should be a valid string. If parameter flags is not 1, this string will be ignored. |
| options.startIndex | {number} - The start index of a range segment. |
| options.endIndex | {number} - The end index of a range segment. |
|
inline |
Load form data of PDF document.
|
inline |
Mark pages which are to be redacted.
| pages | {Array[number]} - page index array which pages to be redacted. |
|
inline |
Move a specified page to a new index position.
| pageIndex | {number} - Index of the specified page. |
| destIndex | {number} - Index of the destination position. |
|
inline |
Remove a PDF page by page index.
| pageIndex | {number} - Index of the specified page. |
|
inline |
Set the visibility of a specified layer node.
| layerId | {string} - string ID of a layer node. |
| visiable | {boolean} - true means visible, and false means invisible. |
|
inline |
Set metadata value.
| key | {string} - Metadata key string. It should not be an empty string. Currently it can be one of the following keys: "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "Trapped", "CreationDate", "ModDate", "pdfaid". It can also be some other custom information keys if they're supported by the PDF file. |
| value | {string} - An string value of metadata value. |
|
inline |
Set document password and permission.
| userPassword | {string} - user password. |
| ownerPassword | {string} - owner password. |
| permission | {number} - User_Permissions 32bit numbers, Print PDF document with normal mode. (Bit 3 ); Modify PDF contents. (Bit 4);Extract PDF contents. (Bit 5);Operate text annotations and fill in interactive form fields. (Bit 6);Fill PDF form. (Bit 9);Disabilities support. (Bit 10);Assemble PDF document. (Bit 11);Print PDF document with higher qualities. (Bit 12); |
| cipher | {string} - Cipher_Type Cipher type, Available values: "none", "rc4", "aes128", "aes256" |
| isEncryptMetaData | {boolean} - true means to encrypt metadata, and false means not to encrypt metadata |