I am using the NReco Html to Pdf conversion dll for C# but it's failing to encode correctly. The html is rendering properly but when i render the pdf, it fails to convert the ' or " characters correctly which i know is encoding. Looking for someone who has used this dll and solved this issue, below is my encoding meta for the html page.
<meta http-equiv="Content-Type" charset="UTF-8" />
The meta command is wrong. It should be either
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
or
<meta charset="UTF-8"/>
(with no http-equiv).
Note, however, that using a meta command for the charset is no guarantee that the desired charset is indeed used. The actual http header may override this setting with a charset of its own.
Also, with regards to your comment that it's rendered correctly, note that web browsers may use a different algorithm to determine the encoding than the dll. Correcting the meta command may or may not help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With