Skip to content

Instantly share code, notes, and snippets.

@bjoerntx

bjoerntx/test.cs Secret

Created August 4, 2023 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/2a64c5fa580e40689d5130a385b0cf94 to your computer and use it in GitHub Desktop.
Save bjoerntx/2a64c5fa580e40689d5130a385b0cf94 to your computer and use it in GitHub Desktop.
// Check if the table is across pages
// If the first cell of the table is on a different page than the last cell of the table,
// the table is across pages
private bool IsTableAcrossPages(Table table) {
int tableStart = table.Cells.GetItem(1, 1).Start;
int tableEnd = table.Cells.GetItem(table.Rows.Count, table.Columns.Count).Start;
int tableStartPage = textControl1.GetPages().GetItem(tableStart).Number;
int tableEndPage = textControl1.GetPages().GetItem(tableEnd).Number;
return tableStartPage != tableEndPage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment