I have few images in my web page , i am trying to convert a div element which has images to pdf as :
var element = document.getElementById(canvasId);
let doc = new jsPDF('p', 'pt', 'a4');
doc.addHTML(element, function () {
doc.save('testdoc.pdf');
});
The pdf doesn't show images in testdoc.pdf
, should i need to add any more attributes ?
A Quick Q :
- Is it possible to convert full page to image (with all images and styles of web page) similar to pdf by jsPDF with other libraries ?
If so please guide me with some links , any help is much appreciated thanks .
After a little surfing and workaround :
Images should be in .JPG
If you are trying any images from say online or from AWS add this below conf :