Re: A page break is not working with Named Styles.
Hussein Shafie <[email protected]> Mon, 29 Dec 2014 09:19:34 +0100
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Message-ID | <[email protected]> |
On 12/29/2014 03:11 AM, ronnie wrote:
>
> XFC version : 5.0.0
> OS : Windows and Linux
>
> A page break of section title is working without '-styles' option, but
> it is not working with '-styles' option.
> A page break of normal paragraph is no problem with '-styles' option.
>
> Please refer to the attachment:
>
> 1. sample1_sty.fo : I have added "<fo:block break-after="page"/>" to
> test the effect of
> page break of section title under '-styles'
> option. Please see line 134 of this file.
>
> 2. sample1.docx : This file is generated with -styles=sample1.xfc
> option, and page break is NOT working
> correctly.
>
> 2. sample1_no_named_styles.docx : This file is generated without
> -styles=sample1.xfc option,
> and page break is working.
>
> So, please let me know how to fix the problem.
>
The issue you have reported is clearly a bug. We'll try to fix this
(probably nasty) bug in the next release of XFC.
Meanwhile, two possible workarounds, of course, after removing the empty
"<fo:block break-after="page"/>":
1) Add break-after="page" to the block having a named heading style.
Example:
---
<fo:block font-family="sans-serif" font-size="12pt" line-height="1.09em"
font-weight="bold" color="#004080" keep-with-next="always"
space-before="1.09em" space-after="1.09em" xfc:user-style="Heading 3"
break-before="page">This is another "h3" element.</fo:block>
---
OR
2) Add break-after="page" to the named heading style. Example:
---
<paragraph-style name="Heading 3" base-style="Heading"
outline-level="3" numbering-level="3"
font-size="12pt" line-height="1.09em"
space-before="1.09em" space-after="1.09em"
break-before="page" />
---
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support