rdvojmoc / DinkToPdf

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
MIT License
1.09k stars 417 forks source link

Wrong font-family rendering #85

Open docsprodev opened 5 years ago

docsprodev commented 5 years ago

Try convert:

<html><head><meta charset="UTF-8"/></head><body>
<p style='font-family: "Times New Roman", Times, serif;'><span>Section 1.10.32 of de Finibus Bonorum et Malorum?</span></p>
<p style="font-family:Times New Roman;"><span>But I must explain to you how all this mistaken idea of denouncing pleasure. </span></p>
<p style="font-family:Arial, Helvetica, sans-serif;">Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut</p>
<span style="font-family: 'MICR Encoding';">But I must explain to you how all this mistaken idea of denouncing lendus. </span>
<p style="font-family:'Times New Roman', serif;">Temporibus autem qwise man ction: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.</p>
<p style="font-family: Courier New,Courier,Lucida Sans Typewriter,Lucida Typewriter,monospace;"><span style="font-size:14px;line-height:150%">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do </span></p>
<p style="margin-top:20px;font-family: 'RNS Sanz';font-size:14px;line-height:150%;margin-bottom:0">dfgsdf gdsfgfdsgsdfgsdfg sfdg adgsdfgsdfg sdfgsdfgsdfgsdfg sdfgsdgsdgsdfgsdfg ghhjgkhjk sdfgadgfsdgfsdfdsfg</p>
</body></html>

PrintScreen

All font converts wrong like: Arial??????? or TimesNewRoman???????,

Should be: Arial or Times New Roman.