Comparing version
{ | ||
"name": "pdfmake", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://bpampuch.github.io/pdfmake", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "pdfmake", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Client/server side PDF printing in pure JavaScript", | ||
@@ -10,3 +10,3 @@ "main": "src/printer.js", | ||
"dependencies": { | ||
"pdfmake-pdfkit": "~0.5.2-b" | ||
"pdfmake-pdfkit": "~0.5.2-d" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -78,4 +78,4 @@ pdfmake [](https://travis-ci.org/bpampuch/pdfmake) [](http://badge.fury.io/js/pdfmake) [](http://badge.fury.io/bo/pdfmake) | ||
// print the PDF | ||
pdfMake.createPdf(docDefinition).print(); | ||
// print the PDF (not working in this version, will be added back in a couple of days) | ||
// pdfMake.createPdf(docDefinition).print(); | ||
@@ -82,0 +82,0 @@ // download the PDF |
@@ -7,2 +7,3 @@ /* jslint node: true */ | ||
var PdfKit = require('pdfmake-pdfkit'); | ||
var PDFReference = PdfKit.PDFReference; | ||
var sizes = require('./standardPageSizes'); | ||
@@ -101,11 +102,3 @@ var ImageMeasure = require('./imageMeasure'); | ||
if(options.autoPrint){ | ||
var PDFReference = this.pdfKitDoc.store.objects[2].constructor; | ||
var jsRef = this.pdfKitDoc.ref({ | ||
S: 'JavaScript', | ||
JS: new StringObject('this.print\\(true\\);') | ||
}); | ||
var namesRef = this.pdfKitDoc.ref({ | ||
Names: [new StringObject('EmbeddedJS'), new PDFReference(jsRef.id)], | ||
}); | ||
this.pdfKitDoc.store.objects[2].data.Names = { JavaScript: new PDFReference(namesRef.id) }; | ||
console.warn('no autoprint support, will be added in a couple of days'); | ||
} | ||
@@ -112,0 +105,0 @@ return this.pdfKitDoc; |
98642
-0.19%2567
-0.27%Updated