A have a chart and a grid with ~100 lines, then another chart with a grid with ~100 lines on a bootstrap built page with an export to PDF button on it. I can press the button and it will export all of the data to a single page. When it comes to printing the PDF the content is so small it's unreadable. This is the javascript to do that:
// Convert the DOM element to a drawing using kendo.drawing.drawDOM
kendo.drawing.drawDOM($(".content-wrapper"))
.then(function (group) {
// Render the result as a PDF file
return kendo.drawing.exportPDF(group, {
paperSize: "auto",
margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }
});
})
.done(function (data) {
// Save the PDF file
kendo.saveAs({
dataURI: data,
fileName: filename + ".pdf",
proxyURL: "//"
});
});
In both the drawDOM and exportPDF sections I have tried to set the page size to "A4" and multipage enabled, with and without page breaks but it never seems to scale the page properly and sometimes the charts just don't render at all.
The page is in sections and so could be split over multiple pages with a page break class.
What do I need to do to have the PDF page break correctly whilst staying at the correct scale?