title: How can I insert a page break?
body: <p>I need to insert a page break after printing some paragraphs. I found a function to insert the page break, but it inserts only an empty paragraph and not a page break.</p>
  
  <p>This is the function:</p>
  
  <pre><code>private static void addPageBreak() {
      MainDocumentPart documentPart = wp.getMainDocumentPart();
  
      Br breakObj = new Br();
      breakObj.setType(STBrType.PAGE);
  
      P paragraph = factory.createP();
      paragraph.getContent().add(breakObj);
      documentPart.getJaxbElement().getBody().getContent().add(paragraph);
  }
  </code></pre>
  
  <p>How can I fix this function to insert a full page break?</p>