mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Merge pull request #10334 from Snuffleupagus/OpenAction-dest
[api-minor] Add support for OpenAction destinations (issue 10332)
This commit is contained in:
commit
103f4616ac
10 changed files with 99 additions and 10 deletions
|
@ -650,6 +650,14 @@ class PDFDocumentProxy {
|
|||
return this._transport.getPageMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with an {Array} containing the
|
||||
* destination, or `null` when no open action is present in the PDF file.
|
||||
*/
|
||||
getOpenActionDestination() {
|
||||
return this._transport.getOpenActionDestination();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with a lookup table for
|
||||
* mapping named attachments to their content.
|
||||
|
@ -2167,6 +2175,11 @@ class WorkerTransport {
|
|||
return this.messageHandler.sendWithPromise('GetPageMode', null);
|
||||
}
|
||||
|
||||
getOpenActionDestination() {
|
||||
return this.messageHandler.sendWithPromise('getOpenActionDestination',
|
||||
null);
|
||||
}
|
||||
|
||||
getAttachments() {
|
||||
return this.messageHandler.sendWithPromise('GetAttachments', null);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue