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 () { ...@@ -304,16 +304,19 @@ $(document).ready(function () {
toPdf: { toPdf: {
text: 'PDF', text: 'PDF',
click: function () { click: function () {
return html2canvas(document.getElementById("calendar")).then(function (canvas) { var srcEl = document.getElementById("calendar");
var container = document.createElement("div"); var parent = srcEl.parentNode;
container.style.backgroundColor = "#FFFFFF"; var container = document.createElement("div");
container.appendChild(canvas); container.style.backgroundColor = "#FFFFFF";
document.body.appendChild(container); container.style.width = "3840px";
var pdf = new jsPDF('l', 'mm', [297, 210]); document.body.appendChild(container);
pdf.addHTML(container, function () { container.appendChild(srcEl);
pdf.save('daily-planning.pdf');
document.body.removeChild(container); 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