0

Unfortunately the EvoPdf docu doesn't give a statement if emojis are supported in Html -> Pdf conversion.

I've tried:

var html = "<html><body>123</body></html>";

var htmlToPdfConverter = new HtmlToPdfConverter();

var fileName = $@"c:\temp\emojies\test_{DateTime.Now:HHMMddhhmmss}.pdf";

htmlToPdfConverter.ConvertHtmlToFile(html, null, fileName);

Process.Start(fileName);

The resulting pdf just contains "123" and nothing more (no ? for unsupported characters).

Can anyone confirm that EvoPdf doesn't support emojis in pdf conversion?

What bits are relevant for emoji support in this context? Is it the used font-type, the used encoding or something else?

  • Personally I've experienced nothing but pain with third-party WebKit-based HTML-to-PDF based converters like EvoPDF, Qt's and wkhtmltopdf. Instead I recommend using Chrome in headless mode with Puppeteer instead (Puppeteer is Google's official automation system for Chrome). There are Puppeteer libraries for .NET: e.g. https://www.puppeteersharp.com/examples/index.html – Dai Oct 14 '20 at 07:32
  • @Dai: Interesting approach! Didn't know of this library! Right now that would cause too much refactoring, but mid-term this could be a nice alternative to evopdf (as we have some other issues with this component)! – Sebastian Gall Oct 14 '20 at 10:14

1 Answers1

0

The NE (New Edition) version you can download from https://www.evopdf.com/download.aspx supports the emojis from your example.

EvoPdf
  • 523
  • 3
  • 9
  • I can confirm that the NE Version supports emojis. @EvoPdf: Thanks! But there is still nothing in the docu about emoji support... – Sebastian Gall Oct 22 '20 at 07:33