10 September 2010 0 comments Web development
wkhtmltopdf is by far the best tool available to make PDFs. Yes. I have tried ReportLab and PISA. ReportLab might be more powerful but what you gain in fine-grained control you lose in hours and hours of productivity.
Anyway, I've learned something about font-size shrinkage and using wkhtmltopdf.
Basically, if use percentage to change a font size (Arial in this case) you get a PDF where the letters are unevenly spaced between. It took me a while to figure out what the hell was going on until I changed the font-size from
90% to exactly
('font-size:90%'; the spots of red are my highlights of the ugly spacings)
('font-size:11px'; not perfect but much better)
So, at first I thought this was the first time wkhtmltopdf has disappointed me but I guess I'll just have to remember not to use percentages and continue to favor wkhtmltopdf as my choice of weapon in the PDF production world.
- I just discovered wikiHow 8 September 2010
- In jQuery, using the :visible selector can be dangerous 14 September 2010
- Related by category:
- Fastest way to find out if a file exists in S3 (with boto3) 16 June 2017 Web development
- How to throttle AND debounce an autocomplete input in React 1 March 2018 Web development
- How to create-react-app with Docker 17 November 2017 Web development
- Be very careful with your add_header in Nginx! You might make your site insecure 11 February 2018 Web development
- How to have default/initial values in a Django form that is bound and rendered 10 January 2020 Web development
- Related by keyword:
- Convert web page to PDF, nicely 4 February 2018
- PythonPoint 10 January 2004
- Printer friendly and PDF version of every page 14 January 2004