Code
Dim pdf As
Aspose.Pdf.Generator.Pdf = New
Aspose.Pdf.Generator.Pdf()
'set the license file
Dim lic AsNew Aspose.Pdf.License()
lic.SetLicense(System.Web.HttpContext.Current.Server.MapPath("AsposeLicense/Aspose.Total.lic"))
' add the section to PDF document sections collection
Dim section As
Aspose.Pdf.Generator.Section = pdf.Sections.Add()
section.PageInfo.PageWidth = Aspose.Pdf.Generator.PageSize.LetterWidth
section.PageInfo.PageHeight = Aspose.Pdf.Generator.PageSize.LetterHeight
Dim marginInfo As
Aspose.Pdf.Generator.MarginInfo = New
Aspose.Pdf.Generator.MarginInfo()
marginInfo.Top = 0
marginInfo.Bottom = 0
marginInfo.Left = 0
marginInfo.Right = 0
Dim marginInfotext As
Aspose.Pdf.Generator.MarginInfo = New
Aspose.Pdf.Generator.MarginInfo()
marginInfotext.Top = 95
marginInfotext.Bottom = 95
marginInfotext.Left = 35
marginInfotext.Right = 35
section.PageInfo.Margin = marginInfotext
Dim txt1 As
Aspose.Pdf.Text.TextFragment = New
Aspose.Pdf.Text.TextFragment()
txt1.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Justify
Dim graph1 As
Aspose.Pdf.Generator.Graph = New
Aspose.Pdf.Generator.Graph(section)
graph1.Margin.Top = 0
graph1.Margin.Bottom = 0
section.Paragraphs.Add(graph1)
Dim text As
Aspose.Pdf.Generator.Text = New
Aspose.Pdf.Generator.Text(section, sHtml)
text.IsHtmlTagSupported = True
section.Paragraphs.Add(text)
section.IsSpaced = True
'set page size
pdf.PageSetup.PageWidth = Aspose.Pdf.Generator.PageSize.LetterWidth
pdf.PageSetup.PageHeight = Aspose.Pdf.Generator.PageSize.LetterHeight
pdf.PageSetup.Margin
= marginInfo
pdf.Save(sTempPDF)
HTML Source sHtml =
<html><body><table cellspacing="2.50cm" width="100%"><tbody><tr><td><p></p><p><br /></p><p style="margin-top: 0px;margin-bottom: 0px;">1. This is an example of a decision, including special characters like "ô" and "í" and "ã" and other features (like parentheses) and a noun's possessive forms. --</p><p><br /></p><p style="margin-left: 0.5in;margin-top: 0px;margin-bottom: 0px">a. Some parts of the text will need to be indented.</p><p><br /></p><p style="margin-left: 1in;margin-top: 0px;margin-bottom: 0px">i). and some, even further;</p><p><br /></p><p style="margin-top: 0px;margin-bottom: 0px;">2. All paragraphs will also need a tab character between the number and text, which transfers to the IR intact, and paragraph breaks between each.</p><p></p><p><br /></p><p></p><p><br /></p></td></tr></tbody></table></body></html>