I am getting the exception "The Font ‘serif’ is not found. This font is not supported."
Hi Bibekananda,
Hi,
Hi Bibekananda,
the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34783. We
will investigate this issue in details and will keep you updated on the status
of a correction.
apologize for your inconvenience.
// Instantiate an object PDF class<o:p></o:p>
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
// add the section to PDF document sections collection
Aspose.Pdf.Generator.Section section = pdf.Sections.Add();
// Read the contents of HTML file into StreamReader object
StreamReader r = File.OpenText(@"C:\pdftest\SampleHMTL\4-ibooks_page.html");
//Create text paragraphs containing HTML text
Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, r.ReadToEnd());
// enable the property to display HTML contents within their own formatting
text2.IsHtmlTagSupported = true;
//Add the text paragraphs containing HTML text to the section
section.Paragraphs.Add(text2);
// Specify the URL which serves as images database
pdf.HtmlInfo.ImgUrl = @"C:\pdftest\SampleHMTL/";
pdf.SetUnicode();
//Save the pdf document
pdf.Save(@“C:\pdftest\SampleHMTL\4-ibooks_page_HTML2pdf.pdf”);
The issues you have found earlier (filed as PDFNET-34783) have been fixed in Aspose.PDF for .NET 25.3.