More seriously, your problem has no solution that does not involve running your document through Word. I found this reference http://www.word.mvps.org/Downloads/WordsNumberingExplainedUSLetter.pdf, page 16:

It is worth mentioning that in Word, “pages” do not exist in the document file. Like a professional typesetter, Word makes up its pages on the fly when it displays or prints a document. Word uses measurements from the installed fonts and the installed printer driver to do this. It is almost impossible to get two machines so exactly similar that a document will paginate with exactly the same page breaks on each. Sometimes people complain that when they open the document on a different machine, some of the page numbers in the TOC or Index are “wrong”. They’re not: when the document is opened on the other machine, minute variations in set-up that do not show over a ten page memo will cause variations in the position of page breaks in a 1,000-page manual. If you remember to update the TOC and Index before you print, the problem corrects itself.

So the page numbers do not exist in the document, therefore you cannot retrieve them to split the text into pages. Only Word can do that for you.

PS.: Apologies for my little joke on the page numbers above...


In reply to Re: How Can I get the Word Document Page Number in Perl Using Linux? by hdb
in thread How Can I get the Word Document Page Number in Perl Using Linux? by prabuvos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.