Issue with PDF Generation - Strange Symbols Appearing

Hello GemBox Support,

I am experiencing an issue when generating a PDF file using your library. The generated PDF contains strange symbols that do not appear in the original text.

Here are the details of my issue:

  1. Original Text Format: The original text contains HTML tags and is in French.
  2. PDF Generation Process: I am using GemBox to convert this text into a PDF file.
  3. Issue: In the generated PDF, the text appears with strange symbols. This issue occurs consistently when I generate the PDF.

Could you please advise on what might be causing this issue and how I can resolve it? Any help would be greatly appreciated.

Thank you, Raafat

Hi Raafat,

Please send us your HTML content so that we can try to reproduce your issue and investigate it.

Regards,
Mario

Text removed by user

Hi Raafar,

Those are ZERO WIDTH JOINER [ZWJ] characters (U+200D), they are written after a few <span> elements.

Anyway, try using this:

var document = new DocumentModel();
string html = @"<h2>La berce du Caucase</h2>...";
html = html.Replace("\u200D", string.Empty);
document.Content.LoadText(html, LoadOptions.HtmlDefault);

Does this solve your issue?

Regards,
Mario

Hi Mario,

Yes, it works well using
html.Replace("\u200D", string.Empty);

Thanks a lot

Regards,
Raafat