要这样 pdfTable.SplitLate = false; pdfTable.SplitRows = true;You should add the table to the document using Document.Add() if you want automatic splitting of the rows across pages. Then SplitLate and SplitRows will work as expected.When SplitLate = true (default) the table will be split before the next row that does fit on the page. When SplitLate = false the row that does not fully fit on the page will be split. When SplitRows = true (default) the row that does not fit on a page will be be split. When SplitRows = false the row will be omitted.So SplitLate && SplitRows: A row that does not fit on the page will be started on the next page and eventually split if it does not fit on that page either.SplitLate && !SplitRows: A row that does not fit on the page will be started on the next page and omitted if it does not fit on that page either.!SplitLate && SplitRows: A row that does not fit on the page will be split and continued on the next page and split again if it to last for the next page too.!SplitLate && !SplitRows: I'm a little unsure about this one. But from the sources it looks like it's the same as SplitLate && !SplitRows: A row that does not fit on the page will be started on the next page and omitted if it does not fit on that page either.But as for your question: Document.Add() will only be usable if the table is not needed to be absolutely positioned. But it's seems like there is a way to do it though by adding the table to a ColumnText (it's actually a ColumnText object that does all the table splitting) and then absolutyly position that ColumnText. I haven't looked into it yet, but I will as soon as I get a little more time :)
table.SplitRows = false;
看起来是这么个意思,可以我设置了这两个属性为 false 也不行啊,第一页还只是显示了一小行记录。
pdfTable.SplitLate = false;
pdfTable.SplitRows = true;You should add the table to the document using Document.Add() if you want automatic splitting of the rows across pages. Then SplitLate and SplitRows will work as expected.When SplitLate = true (default) the table will be split before the next row that does fit on the page. When SplitLate = false the row that does not fully fit on the page will be split. When SplitRows = true (default) the row that does not fit on a page will be be split. When SplitRows = false the row will be omitted.So SplitLate && SplitRows: A row that does not fit on the page will be started on the next page and eventually split if it does not fit on that page either.SplitLate && !SplitRows: A row that does not fit on the page will be started on the next page and omitted if it does not fit on that page either.!SplitLate && SplitRows: A row that does not fit on the page will be split and continued on the next page and split again if it to last for the next page too.!SplitLate && !SplitRows: I'm a little unsure about this one. But from the sources it looks like it's the same as SplitLate && !SplitRows: A row that does not fit on the page will be started on the next page and omitted if it does not fit on that page either.But as for your question: Document.Add() will only be usable if the table is not needed to be absolutely positioned. But it's seems like there is a way to do it though by adding the table to a ColumnText (it's actually a ColumnText object that does all the table splitting) and then absolutyly position that ColumnText. I haven't looked into it yet, but I will as soon as I get a little more time :)