eKoopmans / html2pdf.js

Client-side HTML-to-PDF rendering using pure JS.
MIT License
3.92k stars 1.37k forks source link

Using HTML2PDF, text taking extra space #689

Open RoyNidhi opened 3 months ago

RoyNidhi commented 3 months ago

I am using the HTML2PDF library, and on the click of the button, a pdf shows up to download. In that PDF, I'm getting extra space for some text only.

HTML:-

Vehicle Required: Bike

CSS:- .chip-item{ padding: 11px; font: 400 14px "GeneralSans-Regular", Arial, Sans-Serif; color: #23201c; background: #f8d834; border-radius: 20px; min-height: 36px; display: flex; }

image

MoussaPro commented 1 month ago

Did u solve this?

RoyNidhi commented 1 month ago

Yeah, It's because of the font size. I've changed the font size to 16px and then it worked fine.