An object provided the PSPDFKit for Web to custom items in the document editor toolbar and footer. This object contains methods that can be invoked to retrieve and modify the current stack of document operations to be applied to the open document.
Type Definitions
Type Definitions
Retrieve the page indexes of the currently selected pages. This function can be used to set the scope of a new document operation, for example.
Returns:
The page indexes of the currently selected pages.
- Type
- Array.<number>
Callback function to modify the current stack of document operations to be applied to the open document. This function is invoked with the current stack of document operations as the first argument, and must return the new stack of document operations. The new stack of document operations can be the same as the current one, or a new one.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
PSPDFKit.Immutable.List.<(PSPDFKit.DocumentOperation|PSPDFKit.Immutable.List.<PSPDFKit.DocumentOperation>)> | Callback that receives the current operations committed and returns a new list of operations. |
|
clearPagesSelection |
boolean |
<nullable> |
Whether to clear the current selection of pages after returning the new operations or not. |
Returns:
The new stack of document operations.
- Type
- PSPDFKit.Immutable.List.<(PSPDFKit.DocumentOperation|PSPDFKit.Immutable.List.<PSPDFKit.DocumentOperation>)>