Quantcast
Channel: Java Programming Forum - Learn Java Programming - Apache POI
Viewing all articles
Browse latest Browse all 120

Page break in .docx

$
0
0
Hello!
I parse the word file and want to identify page break.
I try to use method "XWPFParagraph.isPageBreak()", but it always returns false.
Code:

sample = new XWPFDocument(new FileInputStream(samplePath));
           
            List<XWPFParagraph>  paragraphs = sample.getParagraphs();

            for (XWPFParagraph par: paragraphs
                ) {
                System.out.println(par.isPageBreak());

            }

Why can I solve this problem? Maybe I use method wrong or other ways to identify page break exist?

Viewing all articles
Browse latest Browse all 120

Trending Articles