You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the following code:
import in .vue file import jsPDF from 'jspdf';
onClick Event for download HTML to pdf <b-button title="Download" @click="downloadPdf(article.contents)" variant="light" size="sm"> <b-icon icon="file-earmark-arrow-down" variant="primary"></b-icon> </b-button>
in my script section my download function are downloadPdf(contents) { if (process.browser) { const doc = new jsPDF.default() debugger doc.html(contents, { callback: function(doc) { doc.save(); } }); } },
in My Case contents are HTML string like: <p>ksdfksd fsd fksd fdfsd</p>
i want to convert HTML String to PDF Document but Give error in Console are
Uncaught (in promise) Error: Could not load html2canvas: Error: Cannot find module 'html2canvas'