Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How Can I get the Word Document Page Number in Perl Using Linux?

by hdb (Monsignor)
on Apr 17, 2013 at 06:37 UTC ( [id://1029080]=note: print w/replies, xml ) Need Help??


in reply to How Can I get the Word Document Page Number in Perl Using Linux?

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...

  • Comment on Re: How Can I get the Word Document Page Number in Perl Using Linux?

Replies are listed 'Best First'.
Re^2: How Can I get the Word Document Page Number in Perl Using Linux?
by soonix (Canon) on Jun 10, 2013 at 19:50 UTC
    (Update: sorry, wrong parent, please reap)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1029080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-18 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found