Subject: | No page break from "create_section" |
Date: | Thu, 1 Oct 2015 17:42:05 -0500 |
To: | bug-MsOffice-Word-HTML-Writer [...] rt.cpan.org |
From: | Robert Wohlfarth <rbwohlfarth [...] gmail.com> |
This is perl 5, version 16, subversion 1 (v5.16.1) built for
MSWin32-x86-multi-thread
Module version: 1.03
*To reporduce the issue...*
Creating a document with multiple sections. Begin each section like so...
Show quoted text
> $document->create_section(new_page => 1, page => {page_numbers => 1});
The resulting document does not print page breaks.
*The cause...*
"new_page" generates this HTML tag:
Show quoted text> <br clear=3Dall style=3D'page-break-before:*1*
> ;mso-break-type:section-break'>
The value of "new_page" is dropped directly into the tag. It should be the
word "always" for Word to print the page break. Like this:
Show quoted text> <br clear=3Dall style=3D'page-break-before:*always*
> ;mso-break-type:section-break'>
This code works correctly:
Show quoted text> $document->create_section(new_page => 'always', page => {page_numbers =>
> 1});
*Suggested fix...*
Change the documentation for "new_page". This is the original wording:
new_page
If true, a page break will be inserted before the new section. If the
argument is the word 'left' or 'right', one or two page breaks will be
inserted so that the next page is formatted as a left (right) page.
Something like this would avoid the problem:
Show quoted text> An argument of 'always' inserts a page break before the new section. If
> the argument is the word 'left' or 'right', one or two page breaks will be
> inserted so that the next page is formatted as a left (right) page.
--
Robert Wohlfarth