java - Apache POI XWPF Paragraph on Same Page -


i have paragraph contains text , image , and text . these 3 sections present on new line .how ensure paragraph should rendered on same page when there not enough space on current page .if space there on current page should rendered on same page. have used :

    xwpfparagraph p11 = doc.createparagraph();     p11.setalignment(paragraphalignment.left);     xwpfrun r11 = p11.createrun();     p11.setpagebreak(true); 

but not p11 paragraph rendered on new page every time if there space on existing page .

xwpfparagraph p11 = doc.createparagraph(); p11.setalignment(paragraphalignment.left); xwpfrun r11 = p11.createrun(); p11.setpagebreak(true); xwpfparagraph p12 = doc.addparagraph(); xwpfparagraph p13 = doc.addparagraph(); xwpfparagraph p14 = doc.addparagraph(); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -