Hi
I am trying to convert a small html file to pdf for poc but style's is not working. I have attached the html file in zip folder. We are using following code for conversion
Aspose.Pdf.Generator.
Pdf pdf = new Aspose.Pdf.Generator.Pdf();// add the section to PDF document sections collectionAspose.Pdf.Generator.
Section section = pdf.Sections.Add();// Read the contents of HTML file into StreamReader objectStreamReader r = File.OpenText(infilename);//Create text paragraphs containing HTML textAspose.Pdf.Generator.
Text text2 = new Aspose.Pdf.Generator.Text(section, r.ReadToEnd());// enable the property to display HTML contents within their own formattingtext2.IsHtmlTagSupported =
true;text2.IfHtmlTagSupportedOverwriteHtmlFontSizes =
true;text2.IfHtmlTagSupportedOverwriteHtmlFontNames =
true;//Add the text paragraphs containing HTML text to the sectionsection.Paragraphs.Add(text2);
pdf.HtmlInfo.BadHtmlHandlingStrategy =
BadHtmlHandlingStrategy.TreatAsPlainText;pdf.HtmlInfo.ShowUnknownHtmlTagsAsText =
true;//Save the pdf documentpdf.Save(outFileName);
We also tried other APIs but didnot work.
We have full lincense (Fidelity Worldwide). Please suggest best way to handle that.