I am using angular 5 with laravel. generating pdf with jspdf of html 
component. its working but dynamic data is not visible in pdf file.

public captureScreen() 
{ 
let data2pdf = this.store_sales_invoice;
var data = document.getElementById('contentToConvert'); 
html2canvas(data).then(canvas => { 
// Few necessary setting options 
var imgWidth = 208; 
var pageHeight = 295; 
var imgHeight = canvas.height * imgWidth / canvas.width; 
var heightLeft = imgHeight; 
const contentDataURL = canvas.toDataURL('image/png') 
let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF 
var position = 0; 
pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight) 
pdf.save('data.pdf'); // Generated PDF 
}); 
} 



-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to