JSPDF adding images to header and footer
Hi - I have a pdf that is using autotable and latest jspdf versions. I am trying to add an image to header and footer of the pdf. But the pdf is coming back as blank in the plnkr i have created.
https://plnkr.co/edit/okwxsY6IuDlKLMxOtUd8
with that said while i am trying this on my actual application i am getting this error: jsPDF Warning: rendering issues? provide a callback to fromHTML?
Can someone please help?
https://plnkr.co/edit/trrLAn6I9o2OwSkRFBZK?p=preview
Access to Image at 'http://www.snopes.com/politics/graphics/snowhead.png' from origin 'https://run.plnkr.co' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://run.plnkr.co' is therefore not allowed access.
VM382:1
Access to Image at 'https://www.drupal.org/files/issues/header_1.png' from origin 'https://run.plnkr.co' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://run.plnkr.co' is therefore not allowed access.
ah my bad.. well what about the other issue where the image is in the same in my website but when it executes it is giving error jsPDF Warning: rendering issues? provide a callback to fromHTML?
Well, I added in the sample code a callback function... didn't I?
in the callback you have to do the doc.output()
here it is fixed https://plnkr.co/edit/Y3sD4g4uv8LhYjTEKgcy?p=preview
please close this issue
#1567 Should be closed reasons:
- issuer didnt react on answers
- more like an open question than a real issue
- not an issue because plugin is working as expected
- solution was posted by me
I know it's old, but it doesn't work.
@krini Please open a new issue.