Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openExportPDFModal() {
- html2canvas(this.exportPDFRef.current)
- .then((canvas) => {
- this.doc = new jsPDF();
- const img = canvas.toDataURL("image/png");
- const width = this.doc.internal.pageSize.getWidth();
- const height = this.doc.internal.pageSize.getHeight();
- this.doc.addImage(img, 'PNG', 0, 0, width, height);
- this.doc.save(this.state.exportPDFName);
- });
- }
Add Comment
Please, Sign In to add comment