[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:
Jonas Jenwald 2019-04-03 13:48:18 +02:00
parent 57abddc9ca
commit 7a999d1d67
5 changed files with 85 additions and 2 deletions

View file

@ -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);
}