I am trying to convert html content to pdf report using jspdf.
Here is the typescript code.This works fine for small html content.
download() {
const doc = new jsPDF('p', 'pt', 'a4');
const seh = {
'#editor' : function (element, renderer) {
return true;
}
};
const content = this.cont.nativeElement;
const cont = content.innerHTML.toString();
doc.fromHTML(cont, 15, 15, {
'width': 180,
'pagesplit': true,
'elementHandlers' : seh
});
doc.save('terms&conditions.pdf');
}
But for the large html content it fail.I added the pagesplit true property for options but it also does not work.
I tried Convert HTML to PDF in Angular 6 this url. But it also does not work for large html contents.
Is any one can describe how to fix this issue. it will be great helpful. Thanks in advance.