title: Read text and their corresponding page numbers from the .docx in R
body: <p>How can I read a Microsoft .docx file in R and get the text as one field and page number as another?</p>
  
  <p>From the readtext R libraries, I can read the text, but wondering if you know how to get the page number as well? </p>
  
  <pre><code>install.packages("readtext")
  
  library(readtext)
  
  doc &lt;- readtext(system.file("examples/realworld.docx", package="docxtractr"))
  </code></pre>
  
  <p>So the desired output should be</p>
  
  <pre><code>text                page_number
  text from page 1     1
  text from page 2     2
  </code></pre>
  
  <p>Please advise.</p>