Thomas Hoevel wrote:
Hi!
Could this be the error:
Code:
htmlText = htmlText.Replace("ï ;", "ï");
htmlText = htmlParagraphs.Replace("ö ;", "o");
All previous replacements at htmlText are overwritten with the new assignment from htmlParagraphs.
All ANSI characters should work (be sure to activate Unicode if you want to include non-ANSI characters).
Sorry, the htmlParagraphs was the original name of the variable and I change it here to make my explanation clearer. So the original code is:
Code:
htmlParagraphs = htmlParagraphs.Replace("Ä", "Ä");
htmlParagraphs = htmlParagraphs.Replace("Ë", "Ë");
htmlParagraphs = htmlParagraphs.Replace("Ï", "Ï");
htmlParagraphs = htmlParagraphs.Replace("Ö", "Ö");
htmlParagraphs = htmlParagraphs.Replace("Ü", "Ü");
htmlParagraphs = htmlParagraphs.Replace("ä", "ä");
htmlParagraphs = htmlParagraphs.Replace("ë", "ë");
htmlParagraphs = htmlParagraphs.Replace("ï", "ï");
htmlParagraphs = htmlParagraphs.Replace("ö", "o");
htmlParagraphs = htmlParagraphs.Replace("ü", "ü");
htmlParagraphs = htmlParagraphs.Replace("ß", "ß");
htmlParagrapsh is just a String with the html coded text.
However, you mentioned that I should make sure to activate Unicode. When I create the PdfDocumentRenderer I set it like:
Code:
PdfDocumentRenderer renderer = new PdfDocumentRenderer(true, PdfSharp.Pdf.PdfFontEmbedding.Always);
Should I do any other thing to activate unicode then?
Thank you!![/code]