kempsteven / vue-html2pdf

vue-html2pdf converts any vue component or element into PDF, vue-html2pdf is basically a vue wrapper only and uses html2pdf.js behind the scenes.
https://www.npmjs.com/package/vue-html2pdf
MIT License
440 stars 74 forks source link

DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0. #106

Closed akelalix closed 3 years ago

akelalix commented 3 years ago

Hi @all,

Good day.

When I tried using it on a blank component page the code works perfectly, but if I apply it on a child child component, it produces this error

DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.

I tried putting height on the container of the vue-html2-pdf but still produces an error.

Screenshot 2021-09-08 065401

Can someone please help me.

Thank you

akelalix commented 3 years ago

hello @all ,

I added   before my component it seems working fine now but still with blank first page.

Thank you