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
Hello,
First, thanks for your work on this very useful lib. I would like to report an issue encountered while using jspdf library for generating PDFs from HTML templates.
I've been trying to generate using the html() method. However, I've run into a problem as the div containers within the HTML template are all rendered with a white background. This prevents me from adding a background image effectively using doc.addImage()
I've explored various approaches to work around this issue (transparent color of my main container), but haven't found a satisfactory solution yet.
Perhaps there's a way to override the background color of the div containers
Any guidance or assistance you could provide on this matter would be greatly appreciated!
Sincerely yours,
The text was updated successfully, but these errors were encountered:
So, turns out (and you may already know) this js application uses html2canvas, so we can override it's default options by doing the following.
doc.html(source, {
callback: function (doc) {
// return doc;
window.open(doc.output("bloburl"));
},
x: 100,
y: 1250,
width: 2500,
autoPaging: true,
windowWidth: 800,
html2canvas: { backgroundColor: null },
});
Hello,
First, thanks for your work on this very useful lib. I would like to report an issue encountered while using jspdf library for generating PDFs from HTML templates.
I've been trying to generate using the html() method. However, I've run into a problem as the div containers within the HTML template are all rendered with a white background. This prevents me from adding a background image effectively using doc.addImage()
I've explored various approaches to work around this issue (transparent color of my main container), but haven't found a satisfactory solution yet.
Perhaps there's a way to override the background color of the div containers
Any guidance or assistance you could provide on this matter would be greatly appreciated!
Sincerely yours,
The text was updated successfully, but these errors were encountered: