Keeping tables together on page break


#1

Is there anyway to stopping a table from being split in two when it comes to the end of a page? Is it possible to get the amount of the page that has been taken up before you add something that will cause a page break so that you could compare it to the height of the new table?


#2

Dear ConorMc,

Thank you for considering Aspose.

The IsBroken peoperty is used to control the table splitting when it cones to the end of a page. It is not supported to get the amount of page that has been taken up before you add something.


#3

It puts the broken table onto a new page but it also puts any subsequent tables onto a new page of their own. I’m using this code at the bottom of my functions to create tables, is it right :

(VB.net)

If Table1.IsBroken = True Then

Table1.IsFirstParagraph = True

End If


#4

Never mind I figured it out. IsBroken is defaulted to ‘true’ so you have to set it to ‘false’ before you start creating the table.


#5

Is there a similar IsBroken function for a broken row?


#6

Dear ConorMc,

Thank you for considering Aspose.

There is a IsRowBroken property to control the row split.


#7

Is it then possible to set the row as the first on a new page without moving the whole table down?


#8

Dear ConorMc,

Thank you for considering Aspose.

Do you mean split a table manually? This is not supported. But I think this should be a useful feature and I will consider adding support for it later.


#9

Yeah that I what I’m looking for. Thanks for your help.