How to identify if it's enough space in the current page to render an image

Hello.


We generate a document with an image on a page. The image can be in the middle of the page, at the bottom of the page after some text and tables etc. We add the image with “WrapType.None” flag. If it’s not enough space to render a picture on the current page it’s visible partially (see the attached file) and this is the serious issue, We need a way to figure out if it’s enough space to render a picture on the current page and if it’s not we’d simply add a page break before. We know the image height and width, we know the page height but do not know the current Y-position of the document builder when an image is needed to be inserted.

Please advise how to fix the issue.

Thanks.

Hi Dmitry,

Can you please share your input Word document and your code to reproduce the issue?

Best Regards,