I’m working on a project that uses the Aspose.Total (v2.2) license. Due to confidentiality with the client I can’t post the direct XML or source we are using to generate the PDFs but I will do my best to post everything relevant that I can.
Here are some images demonstrating the problem.
Hello Matt,
Thanks for your interest in our products.
I've tried replicating the scenario using the following code snippet and the XML document and I'm afraid I'm unable to notice the problem that rows are missing data values. I've tested it with the latest version of Aspose.Pdf for .NET 4.1.2. Can you please take a look over the following code snippet and the resultant PDF in attachment.
I'm afraid I couldn't test the XML file that you've shared, because it wasn't complete. Can you please try using the latest version and in case the problem still persists, can you please modify the following code so that we can replicate the issue at our end.
We apologize for your inconvenience.
[VB.NET]
Dim dt As DataTable = New DataTable("Employee")
dt.Columns.Add("Modernization Funds", System.Type.GetType("System.Int32"))
dt.Columns.Add("FY2009", System.Type.GetType("System.String"))
dt.Columns.Add("FY2010", System.Type.GetType("System.String"))
dt.Columns.Add("FY2011", System.Type.GetType("System.String"))
dt.Columns.Add("FY2012", System.Type.GetType("System.String"))
dt.Columns.Add("FY2013", System.Type.GetType("System.String"))
dt.Columns.Add("FY2014", System.Type.GetType("System.String"))
Dim rowcount As Int32
For rowcount = 1 To 10\
Dim dr As DataRow = dt.NewRow()
dr(0) = rowcount
dr(1) = rowcount * 1
dr(2) = rowcount * 2
dr(3) = rowcount * 3
dr(4) = rowcount * 4
dr(5) = rowcount * 5
dr(6) = rowcount * 6
dt.Rows.Add(dr)
Next
Dim pdf1 As Pdf = New Pdf()
'Create a Pdf instance and bind the XML template file to Pdf instance
pdf1.BindXML("D:/pdftest/tableissuetemplate.xml", Nothing)
'Get the section and then table from the obtained section of the Pdf that
'is built from the XML template
Dim sec1 As Aspose.Pdf.Section = pdf1.Sections("Section1")
Dim table1 As Aspose.Pdf.Table = CType(sec1.Paragraphs("Table1"), Aspose.Pdf.Table)
Dim row1 As Aspose.Pdf.Row = CType(table1.Rows("Row1"), Aspose.Pdf.Row)
row1.BackgroundColor = New Aspose.Pdf.Color("Green")
''Import data into the Table object from the DataTable created above
table1.ImportDataTable(dt, True, 0, 0, rowcount, 7)
pdf1.Save("d:/pdftest/tableissuetemplate.pdf")
[XML]
<?xml version="1.0" encoding="utf-8" ?>
<Pdf xmlns="Aspose.Pdf">
<Section ID="Section1">
<Table ID="Table1" ColumnWidths="100 50 50 50 50 50 50" IsFirstRowRepeated="true" FontName="Arial">
<All LineWidth="0.1" />
<Row ID="Row1" VerticalAlignment="Center">
</Row>
<Row ID="Row2" VerticalAlignment="Center">
</Row>
</Table>
</Section>
</Pdf>