I use Angular 5 and html2pdf library which helps create pdf file. https://github.com/eKoopmans/html2pdf
this is used for my Angular method.
var element = document.getElementById('document');
var opt = {
margin: [10, 0, 10, 0],
filename: `document.pdf`,
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2, useCORS: true },
jsPDF: { unit: 'mm', format: 'letter', orientation: 'portrait' }
};
html2pdf().from(element).set(opt).save();
After exporting a pdf, I am unable to see any images from online but it shows locally stored images. Here is the example of image online. https://s3.amazonaws.com/images.anterasoftware.com/5b6c5886622d5Screen_Shot_2018-06-27_at_10.37.03_AM.png
Please help, Regards.