mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
[api-minor] Add support for PageMode in the API (issue 8657)
Please refer to https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=82.
This commit is contained in:
parent
4a74cc418c
commit
16c5d41c5b
4 changed files with 55 additions and 0 deletions
|
@ -313,6 +313,24 @@ var Catalog = (function CatalogClosure() {
|
|||
return pageLabels;
|
||||
},
|
||||
|
||||
get pageMode() {
|
||||
let obj = this.catDict.get('PageMode');
|
||||
let pageMode = 'UseNone'; // Default value.
|
||||
|
||||
if (isName(obj)) {
|
||||
switch (obj.name) {
|
||||
case 'UseNone':
|
||||
case 'UseOutlines':
|
||||
case 'UseThumbs':
|
||||
case 'FullScreen':
|
||||
case 'UseOC':
|
||||
case 'UseAttachments':
|
||||
pageMode = obj.name;
|
||||
}
|
||||
}
|
||||
return shadow(this, 'pageMode', pageMode);
|
||||
},
|
||||
|
||||
get attachments() {
|
||||
var xref = this.xref;
|
||||
var attachments = null, nameTreeRef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue