There is no need in using tables here - you can add the elements you want to keep in one page into a Div
and then use setKeepTogether(true)
property to prevent splitting that Div
over two pages.
To make sure an image does not occupy more than the width of the page you can set its maximum width property to 100%.
Here is a code example:
Image image = new Image(ImageDataFactory.create("C:\Users\Alexey\Desktop\Capture.PNG"));
Div div = new Div();
div.add(new Paragraph("#1.)"));
div.add(image.setMaxWidth(UnitValue.createPercentValue(100)));
div.setKeepTogether(true);
document.add(div);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…