disable pdf library

This commit is contained in:
nurafrinaalimi16
2024-04-22 10:35:28 +08:00
parent 4c0415dcb2
commit 30e4738ca9
@@ -82,9 +82,6 @@
<script> <script>
import html2canvas from 'html2canvas';
import jsPDF from 'jspdf';
export default { export default {
data: function () { data: function () {
return { return {
@@ -128,16 +125,16 @@ export default {
} }
}, },
downloadPDF() { // downloadPDF() {
const table = document.getElementById('voterTable'); // const table = document.getElementById('voterTable');
html2canvas(table).then(canvas => { // html2canvas(table).then(canvas => {
const imgData = canvas.toDataURL('image/png'); // const imgData = canvas.toDataURL('image/png');
const pdf = new jsPDF(); // const pdf = new jsPDF();
pdf.addImage(imgData, 'PNG', 0, 0); // pdf.addImage(imgData, 'PNG', 0, 0);
pdf.save('kehadiran-pengundi.pdf'); // pdf.save('kehadiran-pengundi.pdf');
}); // });
}, // },
}, },