I'm having problems with generating a PDF with Chinese chars in it. I download the html as a string from "pageurl" and I use NRECO.Pdfgenerator to generate bytes for pdf from it.
On the pdf, I can see latin characters correctly but not chinese ones. I assume it's an encoding problem but i cannot seem to understand where the mistake is. Heres the code i'm using:
WebClient client = new WebClient();
string htmlstring = client.DownloadString(PageUrl);
//Nreco
HtmlToPdfConverter converter = new HtmlToPdfConverter();
converter.CustomWkHtmlArgs = "--encoding UTF-8";
converter.GeneratePdf(htmlstring);
byte[] result = converter.GeneratePdf(htmlstring);
Response.Clear();
Response.ContentType = "application/pdf";
Response.BinaryWrite(result);
Response.Flush();