title: Page Number In docx4j
body: <p>I am wondering how I can get page number in docx4j </p>
  
  <p>My issue is that I created a table and have to remove some borders between some rows but that made table with no bottom borders before page break <a href="https://i.stack.imgur.com/SuwgV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SuwgV.png" alt="enter image description here"></a>
  So I need information about page number to do something like this </p>
  
  <pre><code> if(currentElementPageNumber != precedentElementPageNumber)
   ctBorderTop.setVal(STBorder.Double);
   tcBorder.setTop(ctBorderBottom);
   tcpr2.setTcBorders(tcBorder);
  </code></pre>
  
  <p>Or a way to detect page break, any ideas would be helpfull </p>