Hi,
I've encountered a problem in the way Aspose.Pdf handles table row breaks in version 4.4.0. The text does not correctly flow from page 1 to page 2, it rather inserts the text at the bottom of the second page. I've compared this with version 3.9.0, the version we're currently using, and this version generates the correct output.
The code snippet is as follows:
public int GeneratePDF(bool isDraft) {
// Some general declarations.
Aspose.Pdf.Cell pdfCell;
Aspose.Pdf.Row pdfRow;
try
{
// Initialize the license.
SetAsposeLicense();
// Create the pdf object.
Pdf pdf = new Pdf();
pdf.PageSetup.PageWidth = Aspose.Pdf.PageSize.A4Width;
pdf.PageSetup.PageHeight = Aspose.Pdf.PageSize.A4Height;
pdf.DestinationType = DestinationType.FitPage;
// Create a section for this page
Section detailsPageSection = pdf.Sections.Add();
// This table contains the two columns with red headers and detail texts.
Aspose.Pdf.Table textTable = new Aspose.Pdf.Table();
textTable.ColumnWidths = "496";
detailsPageSection.Paragraphs.Add(textTable);
pdfRow = textTable.Rows.Add();
pdfCell = pdfRow.Cells.Add();
StringBuilder text = new StringBuilder();
for (int i = 0; i < 80; i++)
{
text.Append("blaat#$NL");
}
pdfCell.Paragraphs.Add(new Text(text.ToString()));
// Save the pdf document to the specified location.
pdf.Save(File.Path);
}
catch { }
return 0;
}
Included are the output from Aspose 3.9.0 and 4.4.0.
Lokhan Wong
DTZ Zadelhoff v.o.f.