Reputation: 171
Section
TextFrame
Table
Row 1 - N, Dynamically generated using a datatable.
TextFrame
Table
Row 1 - N, Dynamically generated using a datatable.
The problem is when i create this document, the two TextFrame overlap each other, and i have to add paragraphs between those two to make them not overlap. The problem is, with more rows, i just can be sure how many add paragraphs are needed.
I am pretty sure there must be a right way to do it and not this:
for (int x = 0; x < tb.Rows.Count / 2; x++)
section.AddParagraph();
Upvotes: 1
Views: 4890
Reputation: 21689
You don't have to use TextFrames to indent tables. TextFrames won't break to the next page, so this "solution" will work for small tables only.
You can indent tables using the table.Rows.LeftIndent property (one would expect this to be a property of class Table, but it works).
See also:
http://forum.pdfsharp.net/viewtopic.php?p=4648#p4648
Upvotes: 3