I'm using wkhtmltopdf 0.12.5 on a Windows and on a Linux machine and experiencing a totally different font size rendering as you can see below.
Source HTML rendering within a browser
wkhtmltopdf settings
$PDFSettings = array(
'outline',
'margin-top' => '10mm',
'margin-left' => '10mm',
'margin-bottom' => '0',
'margin-right' => '0',
'disable-smart-shrinking',
'dpi' => 300,
'image-quality' => 300,
'page-size' =>'A4',
'zoom' => 1);
It's exactly the same PHP application running on both systems (development and integration) which works fine on Windows but not on Linux.
I've already played around with the dpi
and the zoom
settings, which did not change anything.
Does anybody has an idea how I could fix this?
I would bet that there is a difference in the fonts installed on the two systems - either different fonts period or different implementations of the font. Possibly a difference in the default font/size used if you don't specify one.
You might want to check if you can get the matching font from the ttf-mscorefonts-installer
package (Debian/Ubuntu systems - I'm sure RH/CentOS and others have a similar package)