letter-spacing is too large with wkhtmltopdf

后端 未结 9 1104
情书的邮戳
情书的邮戳 2021-02-06 07:30

I\'m using wkhtmltopdf to download a webpage as pdf.

But the css property letter-spacing seems doesn\'t work

font-size:20px; letter-spacing:0px;
<         


        
9条回答
  •  失恋的感觉
    2021-02-06 07:49

    Using wkhtmltopdf 0.12.4 or 0.12.5 on Windows you can use --dpi 300 on the wkhtmltopdf command line, to almost solve the issue. If you zoom a lot you may still notice some letters have negligible differences in spacing, but the letters no longer overlap. And with --dpi 600 makes it almost perfect. The rendered pdf file size was not increased in my scenarios.

提交回复
热议问题