Hello Aspose Team,
Do any one know how to add image htmls to the pdf document using aspose.pdf
Im my .aspx page I have 3 div's. I need to display each div content in a separate page of pdf. im succesful with this.But im searching code to convert each div content to an image html and then save it to pdf.
Please find the sample code below.
Dim SB1 As New StringBuilder
Dim SW1 As New StringWriter(SB1)
Dim htmlTW1 As New HtmlTextWriter(SW1)
ShowValuesDiv.RenderControl(htmlTW1)
Dim dataGridHTML1 As String = SB1.ToString()
Dim sec2 As Aspose.Pdf.Generator.Section = pdf1.Sections.Add()
Dim text2 As New Aspose.Pdf.Generator.Text(sec2, dataGridHTML1)
text2.IsHtmlTagSupported = True
sec2.Paragraphs.Add(text2)
Dim SB2 As New StringBuilder
Dim SW2 As New StringWriter(SB2)
Dim htmlTW2 As New HtmlTextWriter(SW2)
ShowValuesDiv2.RenderControl(htmlTW2)
Dim dataGridHTML2 As String = SB2.ToString()
Dim sec3 As Aspose.Pdf.Generator.Section = pdf1.Sections.Add()
Dim text3 As New Aspose.Pdf.Generator.Text(sec3, dataGridHTML2)
text3.IsHtmlTagSupported = True
sec3.Paragraphs.Add(text3)
sSavePath = ""
pdf1.Save(sSavePath)