mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
[api-minor] Add basic support for PageLayout in the API and the viewer
Please see the specification, https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G6.2393749, and refer to the inline comments for additional details.
This commit is contained in:
parent
57abddc9ca
commit
7a999d1d67
5 changed files with 85 additions and 2 deletions
|
@ -657,6 +657,14 @@ class PDFDocumentProxy {
|
|||
return this._transport.getPageLabels();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with a {string} containing
|
||||
* the page layout name.
|
||||
*/
|
||||
getPageLayout() {
|
||||
return this._transport.getPageLayout();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {Promise} A promise that is resolved with a {string} containing
|
||||
* the page mode name.
|
||||
|
@ -2214,6 +2222,10 @@ class WorkerTransport {
|
|||
return this.messageHandler.sendWithPromise('GetPageLabels', null);
|
||||
}
|
||||
|
||||
getPageLayout() {
|
||||
return this.messageHandler.sendWithPromise('GetPageLayout', null);
|
||||
}
|
||||
|
||||
getPageMode() {
|
||||
return this.messageHandler.sendWithPromise('GetPageMode', null);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue