jsPDF Html2Canvas Tutorial: Convert Div With Attribute Hidden to PDF and Print it in Browser Using HTML5 and JavaScript

Default Featured Image

To hide an HTML tag; add this attribute tag data-html2canvas-ignore=”true” instead of the hidden. So with Mario Alexandro Santini’s suggestion in the comments, I was able to solve the problem. I used jquery to unhide the div in my makePdf() function then hide it again after jsPDF and html2canvas had done their “magic”: You could … Read more

Angular 13 jsPDF Html2Canvas Project: Export Multiple HTML Div Content in Different PDF Pages Using TypeScript

Default Featured Image

On the Angular 2 framework (now Angular 13), you can use the step-by-step logic mentioned below: On click execute generateAllPdf() function gather all 6 id‘s from my HTML collection iterate through each id and call the html2canvas function, as html2canvas runs in the background to process images, I’m using await on function, after the html2canvas … Read more