meteor - blaze.js Uncaught Error: Can't render undefined -
using ongoworks:pdf meteor package save pdf file on client.
the function:
"click #button_export": function(ev, template) { var content = document.getelementbyid("printdata").innerhtml; blaze.saveaspdf(template.report, { filename: bomid + ".pdf", data: content, x: 0, y: 0, orientation: "landscape", unit: "in", format: "letter" }); },
error:
blaze.js?hash=38069f4…:2218 uncaught error: can't render undefinedcheckrendercontent @ blaze.js?hash=38069f4…:2218contentasfunc @ blaze.js?hash=38069f4…:2261blaze.tohtmlwithdata @ blaze.js?hash=38069f4…:2380blaze.outputaspdf @ ongoworks_pdf.js?hash=245293c…:9442blaze.saveaspdf @ ongoworks_pdf.js?hash=245293c…:9461clickbutton_export
i understand copied piece of code meteor-pdf
's example. template named report
? otherwise template.report
non-existent value (undefined
).
also, content
variable should contains object (key=>value pairs) fed specified template (report
) instead of html string.
Comments
Post a Comment