How do I insert an Aspose.Pdf.Table object into my PDF which is based on XML?


I am trying to simply add an Aspose.Pdf.Table to a Section which was read in by XML.

The following code does not work.

How do I read in the Aspose.Pdf.Table that was built in my code into the Section object? I am expecting a .AddTable() function but find none. Where do I connect “MultiviewTable” to my section object?


(m_Table is defined above as an Apose.PDF.Table)

Dim xmlFile As String = HttpContext.Current.Server.MapPath(“xml/ReportInformation.xml”)
m_Pdf.BindXML(xmlFile, Nothing)
Dim sectionXml As Section = m_Pdf.Sections(“Section1”)

*** sectionXml.AddTable(m_Table,“MultiviewTable”)


…other tags…




This doesn’t work either:

Dim multiviewTable As Aspose.Pdf.Table = CType(sectionXml.Paragraphs(“MultiviewTable”), Aspose.Pdf.Table)
multiviewTable = m_Table

1. in the first line I define multiviewTable as the object in the XML file
2. in the second line I fill multiviewTable with “m_Table” which I can see in debugging that multiviewTable is full of data, and it displays if I output without using XML, i.e. just straight coding.

How can I attach my Aspose.Pdf.Table “m_Table” to the outgoing Pdf object?




Dear Edward,

Thank you for considering Aspose.

You can use Section.Paragraphs.Insert method to insert a table into section.