Hi.
I want to convert html to pdf, but as a result the font is shown as diamonds.
What do I need to do to get readable text in pdf
An example html file and the resulting pdf attached.
StreamReader r = File.OpenText(@"e:\Temp\digital_original.html");
MemoryStream stream1 = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(r.ReadToEnd()));
HtmlLoadOptions options = new HtmlLoadOptions { InputEncoding = "utf-8" };
using (Document pdfDocument = new Document(stream1, options))
{
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfDocument.Save(@"e:\Temp\digital.html.pdf", pdfSaveOptions);
}
digital_original.zip (266.2 KB)