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:
commit
af71ea7a7d
7 changed files with 123 additions and 28 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue