mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Merge pull request #10738 from Snuffleupagus/ViewerPreferences-api
[api-minor] Add support for ViewerPreferences in the API (issue 10736)
This commit is contained in:
commit
762c58e0fc
4 changed files with 176 additions and 7 deletions
|
@ -674,6 +674,14 @@ class PDFDocumentProxy {
|
|||
return this._transport.getPageMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with an {Object} containing
|
||||
* the viewer preferences.
|
||||
*/
|
||||
getViewerPreferences() {
|
||||
return this._transport.getViewerPreferences();
|
||||
}
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
@ -2247,8 +2255,12 @@ class WorkerTransport {
|
|||
return this.messageHandler.sendWithPromise('GetPageMode', null);
|
||||
}
|
||||
|
||||
getViewerPreferences() {
|
||||
return this.messageHandler.sendWithPromise('GetViewerPreferences', null);
|
||||
}
|
||||
|
||||
getOpenActionDestination() {
|
||||
return this.messageHandler.sendWithPromise('getOpenActionDestination',
|
||||
return this.messageHandler.sendWithPromise('GetOpenActionDestination',
|
||||
null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue