简体   繁体   English

如何使用Kendo将多个div导出到一个pdf文件?

[英]how can I export multiple divs to one pdf file by using kendo?

This is Kendo's example code about how to export DOM to pdf 这是Kendo关于如何将DOM导出到pdf的示例代码

 <div id="calendar"></div> <script> $("#calendar").kendoCalendar(); var draw = kendo.drawing; draw.drawDOM($("#calendar")) .then(function(root) { // Chaining the promise via then return draw.exportPDF(root, { paperSize: "A4", landscape: true }); }) .done(function(data) { // Here 'data' is the Base64-encoded PDF file kendo.saveAs({ dataURI: data, fileName: "calendar.pdf" }); }); </script> 
What if I have multiple divs to export? 如果我要导出多个div怎么办? For example, I have #calendar1, #calendar2, and I'd like to export all #calendars into one pdf file. 例如,我有#calendar1,#calendar2,并且我想将所有#calendars导出到一个pdf文件中。 Is that possible? 那可能吗?

I think I find an answer in this example. 我想我在这个例子中找到了答案。

Telerik PDF Export Telerik PDF导出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将多个DIV导出为单个pdf - Export multiple DIVs to single pdf 通过使用kendo如何将网格数据导出到以下任何一个文件(csv,excel,Pdf) - By using kendo how to export the grid data to any one of the following files (csv,excel ,Pdf) 如何将文件加载到 Kendo PDF Viewer? - How can load file to Kendo PDF Viewer? Kendo UI网格导出excel和pdf导出,没有创建文件 - Kendo UI grid export excel and pdf export, no file created 如何使用Jquery在多个div中更改日期格式? - How can I change the date format in multiple divs using Jquery? 如何将 Nextjs 页面导出为 pdf? - How can I export a Nextjs page as pdf? 如何使用kendo ui在从react组件下载的pdf中添加页脚 - how can i add footer in downloaded pdf from react component using kendo ui 如何将多个图像组合成一页并将其打印为 pdf? - How can I combine multiple images into one page and print it as a pdf? 使用Javascript,如何将Google文档转换为PDF文件,然后将其“切片”为多个PDF? - Using Javascript, how can I convert a Google doc to a PDF file then “slice” it into multiple PDFs? 如何将多个div保存为图像? - How can I save multiple divs as an image?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM