Hi,
I am using the latest dll but not following DOM approach as there is no html support for the Text.
So I am still using Aspose.Pdf.Generator.Section, Aspose.Pdf.Generator.Table for writing the table.
I have similar kind of table shown below -
AAA
|
BBB
|
CCC
|
DDD
|
EEE
|
FFF
|
GGG
|
HHH
|
III
|
JJJ
|
KKK
|
LLL
|
MMM
|
NNN
|
OOO
|
PPP
|
If the table has many rows, where the rows continue to next page, the rowspan doesn't work properly. I get single row of data in 3 pages and then the remaining all the rows in 4th page. Why is this issue happening?
Here goes my code -
There is a class named StaticPDFVO which has the attributes such as type, number, quantity
I have List StaticPdfList with 60 items in it , data ordered by type
int iteration = 0; string slotType=string.empty;int busTypeRowspan = 1;
foreach(StaticPDFVO adapter inStaticPdfList)
{
iteration++;
Aspose.Pdf.Generator.Row dataRow = mainTable.Rows.Add();
if (adapter.type != slotType)
{
slotType=adapter.type;
dataRow.Cells.Add().Paragraphs.Add(adapter.type);
if (iteration != 1)
{
busTypeRowSpan++;
mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;
}
busTypeRowSpan = 1;
}
else
{
busTypeRowSpan++;
}
dataRow.Cells.Add().Paragraphs.Add(adapter.number);
dataRow.Cells.Add().Paragraphs.Add(adapter.quantity);
}
iteration++;
busTypeRowSpan++;
mainTable.Rows[iteration - busTypeRowSpan].Cells[0].RowSpan = busTypeRowSpan - 1;
All
the rows are spanned for a type. I have many records having the same
type. Since I am spanning those rows, the spanning continues to the same
table in the next page.
But the rows are broken randomly and I am not getting the proper output.
Please suggest
Thanks,
Sharanya