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
432 stars 75 forks source link

The text movedown #168

Closed ChamkhiAnas closed 1 year ago

ChamkhiAnas commented 1 year ago

The text and the html elements move out when i preview or download the pdf

The HTML+CSS page before converting it to pdf :

image

The HTML+CSS page after converting it to pdf :

poorquality

Any solution or tips ?

! ps : im using tailwind css

ChamkhiAnas commented 1 year ago

i found a quick solution for this problem

wrap every text with a span with position: relative; top: -/half of the size of the font/

IsTheJack commented 1 year ago

This is not a solution for that actually. It's more a workaround. I'm facing it as well. I would reopen that because it's a very basic issue that this lib should prevent of

itthikorn2542 commented 5 months ago

i found a quick solution for this problem

wrap every text with a span with position: relative; top: -/half of the size of the font/ This work for me