mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Implemented Settings manager. Now remembering scroll positions
This commit is contained in:
parent
0e906bbaeb
commit
d44f9f2074
3 changed files with 78 additions and 3 deletions
10
src/core.js
10
src/core.js
|
@ -527,6 +527,14 @@ var PDFDocModel = (function PDFDocModelClosure() {
|
|||
this.startXRef,
|
||||
this.mainXRefEntriesOffset);
|
||||
this.catalog = new Catalog(this.xref);
|
||||
|
||||
if(this.xref.trailer && this.xref.trailer.has('ID')) {
|
||||
var fileID = '';
|
||||
this.xref.trailer.get('ID')[0].split('').forEach(function(el) {
|
||||
fileID += Number(el.charCodeAt(0)).toString(16);
|
||||
});
|
||||
this.fileID = fileID;
|
||||
}
|
||||
},
|
||||
get numPages() {
|
||||
var linearization = this.linearization;
|
||||
|
@ -560,7 +568,7 @@ var PDFDoc = (function PDFDocClosure() {
|
|||
this.data = data;
|
||||
this.stream = stream;
|
||||
this.pdf = new PDFDocModel(stream);
|
||||
|
||||
this.fileID = this.pdf.fileID;
|
||||
this.catalog = this.pdf.catalog;
|
||||
this.objs = new PDFObjects();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue