Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. foreach (var item in Data)
  2. {
  3. Table table = new Table();
  4. flowDoc.Blocks.Add(table);
  5. paginatorSource.DocumentPaginator.ComputePageCount();
  6. pagecount = paginatorSource.DocumentPaginator.PageCount;
  7.  
  8. //do some work populating the table details...
  9. TableColumn t = new TableColumn(); //etc...
  10.  
  11. paginatorSource.DocumentPaginator.ComputePageCount();
  12. int newPagecount = paginatorSource.DocumentPaginator.PageCount;
  13.  
  14. if (newPagecount != pagecount)
  15. {
  16. //The table has spanned a new page so set the page break!
  17. table.BreakPageBefore = true;
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement