Hi,
I want to convert file html to pdf, and it doesnt work good.
I was converted file: wall_321819.html
I use this code:
{
string dataDir = Path.GetFullPath("…/…/…/Data/");
Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Section sec = pdf.Sections.Add();
sec.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.A3Width;
sec.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.A3Height;
sec.IsLandscape = true;
StreamReader r = File.OpenText(“L:/Temp/wall_321819.html”);
Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(sec, r.ReadToEnd());
text2.IsHtmlTagSupported = true;
sec.Paragraphs.Add(text2);
pdf.Save(dataDir + “HTMLpdf.pdf”);
}
I added 3 file.
It looks different.
My file .html is not good?