Html -> PDF corrupting Unicode 6.0 characters

When converting HTML -> PDF using HtmlFragment, I noticed that some of the emoji characters present on the text are simply not printed (it draws a square instead) and I managed to reproduce the problem with the code below:

var htmlLoadOptions = new HtmlLoadOptions();
htmlLoadOptions.setEmbedFonts(true);
htmlLoadOptions.setInputEncoding("UTF-8");
frag.setHtmlLoadOptions(htmlLoadOptions);
var doc = new Document("index.html", htmlLoadOptions);
doc.save("test.pdf");

And the following HTML:

<span style="font-family: Noto Emoji Light; ">&#xA7A0;</span>

Apparently it’s only crashing when it’s a unicode 6.0 character (mostly checked the smiley faces emojis). Are there extra configurations needed in order to print them properly?

@samuelmartinucci

Can you please also share the sample output PDF that has been generated in your environment for our reference? We will test the scenario in our environment and address it accordingly.

Hi @asad.ali,

Sure, please find it attached.test4.pdf (93.4 KB)

@samuelmartinucci

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-42947

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.