Free Support Forum - aspose.com

Pb with IsFixedHeight- BackgroundColor and number of lines

Hi,

There is a pb with the folowing code with aspose 6.0 or 6.1 and .NET 1.1 :

Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Generator.Table tab = new Aspose.Pdf.Generator.Table();
DataTable dt = new DataTable();
dt.Columns.Add("nom");
dt.Columns.Add("prenom");

string[] st;
for (int i = 0;i<200;i++)
{
st = new string[2];
st[0] = "henry";
st[1] = "phil";
dt.Rows.Add(st);
}
tab.ColumnWidths = ("80 80");
tab.ImportDataTable(dt,true,0,0,dt.Rows.Count+1,dt.Columns.Count);
tab.RepeatingRows = 1;
foreach (Aspose.Pdf.Generator.Row r in tab.Rows)
{
r.FixedRowHeight = 20f;
}
tab.BackgroundColor = new Aspose.Pdf.Generator.Color("#d3d3d3");
Aspose.Pdf.Generator.Section section = pdf.Sections.Add();
section.Paragraphs.Add(tab);
pdf.Save("c:/pdftest/MemoryStream/HTML4pdf.pdf");

If the dataTable has 20 lines, the resultant PDF is OK, Cells are well coloured but if the dataTable has many lines (200 in this example) cells are not well coloured, only the text in cells is coloured.

In attachment you will see these two tests with 20 lines and 200 lines.

Is there another way to have well coloured cells when the height of cells is mentionned ans when there is more than one page in the resultant PDF?

Thanks

Just for information, the problem doesn't appear with the version 3.4 of aspose.pdf.

Hi,

Thanks for using our products.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-29918. We will investigate this
issue in details and will keep you updated on the status of a correction.<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
PMingLiU;mso-ansi-language:EN-US;mso-fareast-language:ZH-TW;mso-bidi-language:
AR-SA”>

We apologize for your inconvenience.

The issues you have found earlier (filed as 29918) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.