I need to make a document for use in HTML to pdf converter.
A had a problem with breaking items in half on new page like on image above.
So I added page-break-inside: avoid;
But now i need to center that element on the next page. Since i can't do that because everything is in flex box, and thoes tho are flex items (image bellow) i can't do that.
I want to find a way now to detect if that element is on new page with js and hide it, and then show another div with same content but outside of that flex box. But i cant get it working, tried with top offsets, but it's not working properly in pdf-s.