How to convert HTML data from widget in pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2023 01:59 AM
I have created the table user data with tr and th tags in html of widget how to convert the html data in to pdf on click of one button on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2023 11:37 AM
You can do so by calling a print function at the click of a button.
Then define a function in the client script as below :
//get html content of required div into a variable
c.data.myHTML = document.getElementById('<your div tag>').innerHTML;
var printWindow = window.open('', '', 'width=800,height=600');
printWindow.document.open();
printWindow.document.write(c.data.myHTML);
printWindow.document.close();
window.print();
Please mark my answer as helpful if it works for you.