Skip to content

Commit

Permalink
pdfreference fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bpampuch committed Oct 16, 2014
1 parent f221782 commit 008fa6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build/pdfmake.js
Original file line number Diff line number Diff line change
Expand Up @@ -19021,14 +19021,14 @@ PdfPrinter.prototype.createPdfKitDocument = function(docDefinition, options) {
JS: new StringObject('this.print\\(true\\);')
});
var namesRef = this.pdfKitDoc.ref({
Names: [new StringObject('EmbeddedJS'), new PdfKit.PDFReference(this.pdfKitDoc, jsRef.id)],
Names: [new StringObject('EmbeddedJS'), new PDFReference(this.pdfKitDoc, jsRef.id)],
});

jsRef.end();
namesRef.end();

this.pdfKitDoc._root.data.Names = {
JavaScript: new PdfKit.PDFReference(this.pdfKitDoc, namesRef.id)
JavaScript: new PDFReference(this.pdfKitDoc, namesRef.id)
};
}
return this.pdfKitDoc;
Expand Down
2 changes: 1 addition & 1 deletion build/pdfmake.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/pdfmake.min.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ PdfPrinter.prototype.createPdfKitDocument = function(docDefinition, options) {
JS: new StringObject('this.print\\(true\\);')
});
var namesRef = this.pdfKitDoc.ref({
Names: [new StringObject('EmbeddedJS'), new PdfKit.PDFReference(this.pdfKitDoc, jsRef.id)],
Names: [new StringObject('EmbeddedJS'), new PDFReference(this.pdfKitDoc, jsRef.id)],
});

jsRef.end();
namesRef.end();

this.pdfKitDoc._root.data.Names = {
JavaScript: new PdfKit.PDFReference(this.pdfKitDoc, namesRef.id)
JavaScript: new PDFReference(this.pdfKitDoc, namesRef.id)
};
}
return this.pdfKitDoc;
Expand Down

0 comments on commit 008fa6e

Please sign in to comment.