JazzCore / python-pdfkit

Wkhtmltopdf python wrapper to convert html to pdf
MIT License
1.98k stars 329 forks source link

CSS float not working with pdfkit #245

Open RyuFeng opened 1 year ago

RyuFeng commented 1 year ago

Hey, Because of rendering speed for large pdfs I had switched from weasyprint to pdfkit before and while most things worked with it, all of the alignment was messed up because it couldn't work with float. Is it possible to add support for float?

insomnia33 commented 1 year ago

Try switching the display and other properties to -webkit

Worked for me, prob. because wkhtmltopdf is compatible with QtWebkit

example: display: -webkit-box; -webkit-box-align: center; -webkit-box-pack: center;