|
Hi Taylan,
Aspose.Pdf.Generator.Pdf
pdf = new Aspose.Pdf.Generator.Pdf();<o:p></o:p>
// instantiate Section object
Aspose.Pdf.Generator.Section section = pdf.Sections.Add();
// set the margin for section object
section.PageInfo.Margin.Top = 0;
section.PageInfo.Margin.Left= 0;
// set the page width information for section object
section.PageInfo.PageWidth = 1000F;
// set the page Height information for section object
section.PageInfo.PageHeight= 800F;
// adjust font automatically
pdf.IsAutoFontAdjusted = true;
// Read the contents of HTML file into StreamReader object
StreamReader r = File.OpenText(@"c:/pdftest/sample.html");
// instantiate Text object with HTML file contents
Aspose.Pdf.Generator.Text text = new Aspose.Pdf.Generator.Text(section, r.ReadToEnd());
// set the section orientation as Landscape
section.IsLandscape = true;
text.IsFitToPage = true;
text.IsHtmlTagSupported = true;
text.IfHtmlTagSupportedOverwrightHtmlFontNames = true;
text.IfHtmlTagSupportedOverwrightHtmlFontSizes = true;
section.Paragraphs.Add(text);
pdf.Save("c:/pdftest/HTML+ReportResult.pdf");