HTML2PDF renders line-height incorrectly on PHP7 / Ubuntu 20.04

On Ubuntu 16.04 / PHP 5.6 we were successfully converting an HTML snippet to PDF.

On Ubuntu 20.04 / PHP7, the html2pdf module is rendering the line-height differently than the what is expected and different than on Ubuntu 16.04.

I am using the HTML2PDF module for Ubuntu 20.04 here:


Apparently the fonts on Ubuntu 20.04 did not map the same as on Ubuntu 16.04.

Running fc-match "Helvetica" on command line yielded different results:

16.04: “Nimbus Sans L” “Regular”
20.04: “Nimbus Sans” “Regular”

Changing the font-family from “Helvetica” to “Nimbus Sans L” corrected this issue.