HTML2PDF renders line-height incorrectly on PHP7 / Ubuntu 20.04

14 views
Skip to first unread message

Ryan

unread,
Mar 12, 2021, 12:42:15 PM3/12/21
to PDFTron SDK
Question:
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:

Answer:
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.
Reply all
Reply to author
Forward
0 new messages