中间剑道插件创建PDF获取空白pdf
答案 0 :(得分:0)
这是我的剑道示例代码
kendo.drawing.drawDOM(" #content_mergeReport",{ allPages:是的, forcePageBreak:" .page-break", paperSize:" A4", 比例:0.6, 风景:虚假, 肖像:是的, repeatHeaders:是的, multiPage:' true', 保证金:{left:" 1cm&#34 ;, top:" 1.5cm&#34 ;, right:" 1cm&#34 ;, bottom:" 2.5cm" },
/*template: $("#page-template").html()*/
template: kendo.template($("#page-template").html())(
{
pageNum: "",
totalPages: "",
FIRSTDATE: startDate1,
TYPE: typeofuser,
ENDDATE: endDate1,
USER: context.get('practicedetails').Name,
})
})
.then(function (group) {
return kendo.drawing.exportPDF(group, {
});
})
.done(function (data) {
var data1 = {};
var parts = data.split(";base64,");
data1.contentType = parts[0].replace("data:", "");
data1.base64 = parts[1];
data1.filename = $scope.filename;
});