Skip to content
Snippets Groups Projects
Commit f069c150 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

resolution improved

parent f26bde06
No related branches found
No related tags found
1 merge request!90resolution improved
Pipeline #
......@@ -304,16 +304,19 @@ $(document).ready(function () {
toPdf: {
text: 'PDF',
click: function () {
return html2canvas(document.getElementById("calendar")).then(function (canvas) {
var container = document.createElement("div");
container.style.backgroundColor = "#FFFFFF";
container.appendChild(canvas);
document.body.appendChild(container);
var pdf = new jsPDF('l', 'mm', [297, 210]);
pdf.addHTML(container, function () {
pdf.save('daily-planning.pdf');
document.body.removeChild(container);
});
var srcEl = document.getElementById("calendar");
var parent = srcEl.parentNode;
var container = document.createElement("div");
container.style.backgroundColor = "#FFFFFF";
container.style.width = "3840px";
document.body.appendChild(container);
container.appendChild(srcEl);
var pdf = new jsPDF('l', 'mm', [1485, 270]);
pdf.addHTML(container, function () {
pdf.save('daily-planning.pdf');
parent.appendChild(srcEl);
document.body.removeChild(container);
});
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment