I’m writing to you because I have problems to find documentation about what I would like to do.
Let me explain : I’m creating word files (docx) by injecting HTML. The users are writing html content, and I export it in several output formats. One of these formats is docx.
My users can create tables and lists and different blocks.
My problem is about formating. Sometimes, one of these blocks is at the end of a page or is cut in half.
I would like to be able to write a peace of code that would check each page to see if the last element is a table or a list, and check if the first element of the next page is the end of a table or half of a list.
If a block is cut in half or at the wrong position, I would like to insert empty lines to make it appear on the next page.
I’m writing in java.
Could you please give me some documentation links (or maybe an example) of code, that would identify blocks as table or lists or titles, and would check the position of blocks on the page (is it at the end of a page, or is it the first element, etc…) And finally insert empty lines…
Thanks for your help,