1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Merge pull request #8673 from Snuffleupagus/api-pageMode

[api-minor] Add support for PageMode in the API and viewer (issue 8657)
This commit is contained in:
Tim van der Meij 2017-07-23 13:17:07 +02:00 committed by GitHub
commit af71ea7a7d
7 changed files with 123 additions and 28 deletions

View file

@ -329,6 +329,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;