Skip to content

Commit

Permalink
refactor binding virtual file system
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Dec 31, 2017
1 parent 4aec14e commit 1246d7a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/browser-extensions/pdfMake.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Document.prototype._createDoc = function (options, callback) {
}

var printer = new PdfPrinter(this.fonts);
printer.fs.bindFS(this.vfs);
require('fs').bindFS(this.vfs); // bind virtual file system to file system

var doc = printer.createPdfKitDocument(this.docDefinition, options);
var chunks = [];
Expand Down
4 changes: 0 additions & 4 deletions src/printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,3 @@ function endClip(pdfKitDoc) {
}

module.exports = PdfPrinter;


/* temporary browser extension */
PdfPrinter.prototype.fs = require('fs');

0 comments on commit 1246d7a

Please sign in to comment.