mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Refactors FontLoader to group fonts per document.
This commit is contained in:
parent
09772e1e15
commit
06c1904675
6 changed files with 117 additions and 98 deletions
|
@ -24,6 +24,10 @@ var BasePdfManager = (function BasePdfManagerClosure() {
|
|||
}
|
||||
|
||||
BasePdfManager.prototype = {
|
||||
get docId() {
|
||||
return this._docId;
|
||||
},
|
||||
|
||||
onLoadedStream: function BasePdfManager_onLoadedStream() {
|
||||
throw new NotImplementedException();
|
||||
},
|
||||
|
@ -85,7 +89,8 @@ var BasePdfManager = (function BasePdfManagerClosure() {
|
|||
})();
|
||||
|
||||
var LocalPdfManager = (function LocalPdfManagerClosure() {
|
||||
function LocalPdfManager(data, password) {
|
||||
function LocalPdfManager(docId, data, password) {
|
||||
this._docId = docId;
|
||||
var stream = new Stream(data);
|
||||
this.pdfDocument = new PDFDocument(this, stream, password);
|
||||
this._loadedStreamCapability = createPromiseCapability();
|
||||
|
@ -136,8 +141,8 @@ var LocalPdfManager = (function LocalPdfManagerClosure() {
|
|||
})();
|
||||
|
||||
var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
||||
function NetworkPdfManager(args, msgHandler) {
|
||||
|
||||
function NetworkPdfManager(docId, args, msgHandler) {
|
||||
this._docId = docId;
|
||||
this.msgHandler = msgHandler;
|
||||
|
||||
var params = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue