Alparslan Ozturk
Alparslan Ozturk

Reputation: 13

SelectPDF ConvertUrl Non-English Characters Error

In my demo project I'm using Selectpdf tool to convert html pages to pdf documents. These html pages are stored locally. So I'm using ConvertUrl function for conversion. Here is the inline code `

string url = AppDomain.CurrentDomain.BaseDirectory + "HTML" + "\\OrderName_" + DateTime.Now.ToString("yyyy'-'MM'-'dd'_'HH'-'mm_") + MockOrderNo + ".html";

HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl(htmlurl);

` Then I save the pdf document, using doc.Save(). Here is the pdf document result enter image description here

Now as you can see there is a problem displaying Turkish characters like "İ,ı,ş,ğ...". How can I resolve this using SelectPdf? If solving this with SelectPdf is not possible, what are the other prefable pdf conversion tools that does not have this kind of problem?

Also for my requirements I don't use ConvertHtmlString function. I need to store html pages in a folder, convert these html pages to pdf and store those pdf documents in an another folder.

Thanks for your help

Upvotes: 0

Views: 203

Answers (1)

Alparslan Ozturk
Alparslan Ozturk

Reputation: 13

I just changed the encoding of html file to windows-1252. This solved the problem

Upvotes: 0

Related Questions