I am using meteor 1.5 . I have a simple button to call the event template for creating a PDF from a collection list (as it is stated in the example) . However I get the error : TypeError: pdfMake.createPdf is not a function . Any thoughts ?
import pdfMake from 'meteor/nilsdannemann:pdfmake';
Template.report_user_purchase.events({
'click #print_button': function() {
var customerPurchase = Purchased.find({username: Meteor.userId()});
// Define the pdf-document
var docDefinition = {
content: [
'Some text',
customerPurchase,
'Some text'
]
};
pdfMake.createPdf(docDefinition).open();
}
});
I am using meteor 1.5 . I have a simple button to call the event template for creating a PDF from a collection list (as it is stated in the example) . However I get the error : TypeError: pdfMake.createPdf is not a function . Any thoughts ?
import pdfMake from 'meteor/nilsdannemann:pdfmake';
Template.report_user_purchase.events({ 'click #print_button': function() { var customerPurchase = Purchased.find({username: Meteor.userId()}); // Define the pdf-document var docDefinition = { content: [ 'Some text', customerPurchase, 'Some text' ] }; pdfMake.createPdf(docDefinition).open(); } });