I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2005-09-16 21:59:07-07 by jmgdoc in response to 988
Re: Accessing contents of headers and footers

Caution ! Up to 2.007, getHeaderParagraph() and getFooterParagraph() are buggy. They work in 2.008, to be released soon (it's a matter of days, maybe hours).

But your code will never work as is. The first argument og getPageHeader() is a master page, not a page number. In text documents, the printable pages are dynamically generated by the office software; they are not persistent objects stored in the files. Headers and footers belong to page masters (which are persistent objects, used by the rendering software to dynamically build the printable pages).

Knowing that object numeric positions are zero-based, the number of the 1st patragraph is 0.

In addition, the master pages are generally described in the 'styles' workspace (neither in 'content' not in 'meta').

So, in order to get, say, the 1st paragraph of the header of the "Standard" (default) master page, you can write:
my $para = $doc->getHeaderParagraph("Standard", 0);

But you should wait 2.008 to try that.

Last remark: print $para will never print the text of the paragraph. getParagraphHeader() returns a paragraph element, which is a text container and not a text content. To print the content you should use write something like
print $doc->getText($para);
Direct Responses: Write a response