docx icon indicating copy to clipboard operation
docx copied to clipboard

How to check if a section is broken by page break

Open xeiaaa opened this issue 6 years ago • 3 comments

I'm currently creating an app that generates a docx file with a signature block at the last part. The other parts before the signature block is dynamic, so there are some cases that the signature block is broken by page break (see the first picture). If ever it was broken, I'd like to move the whole signature block to the next page (see second image). Does anyone know how can I do it? The details on the top of the document varies so much, so it's a little hard to check when it will generate something like on the first image.

image image

xeiaaa avatar Oct 05 '20 00:10 xeiaaa

I do not think there is a way I am afraid, maybe create a function which calculates the length of the body of the text?

dolanmiu avatar Oct 05 '20 17:10 dolanmiu

Can't this be achieved by using keepNext?

vasslehel avatar May 04 '21 15:05 vasslehel

Yes, this can be achieved with keepNext

I misunderstood the issue. I thought he wanted a boolean value returned weather or not a paragraph was broken by a page break

dolanmiu avatar May 07 '21 03:05 dolanmiu