我正在使用abcpdf创建一个表。它应该从第一页的中间开始,并在页脚之前中断。然后,它应该在新页面的开头重新开始(取决于行数)。
这是代码:
string theText = System.IO.File.ReadAllText(@"C:\Users\..file.txt")
Doc theDoc = new Doc();
theDoc.AddGrid();
theDoc.Rect.String = "10 200 600 780";
theDoc.FrameRect();
PDFTable theBigTable = new PDFTable(theDoc, 1);
theBigTable.NextRow();
theBigTable.SetRowHeight(200);
theBigTable.NextRow();
theBigTable.SetRowHeight(300);
PDFTable theTable = new PDFTable(theDoc, 5);
theTable.CellPadding = 5;
theTable.HorizontalAlignment = 1;
theText = theText.Trim();
theText = theText.Replace("\r\n", "\r");
string[] theRows = theText.Split(new char[] { '\r' });
for (int i = 0; i < theRows.Length; i++)
{
theTable.NextRow();
string[] theCols = theRows[i].Split(new char[] { '\t' });
theTable.AddHtml(theCols);
theTable.FrameColumns();
}
theTable.Frame();
theDoc.Flatten();
//footer
theDoc.Rect.String = "10 10 600 60";
theDoc.FrameRect();
theDoc.Save("output.pdf");
theDoc.Clear();
问题在于表格在新页面的相同位置(而不是从开头)重新开始,并且它覆盖仅出现在最后一页的页脚。
有什么建议吗?