You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/06/04 12:25:06 UTC
DO NOT REPLY [Bug 42576] New: - force-page-count not working as expected
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42576
Summary: force-page-count not working as expected
Product: Fop
Version: all
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: page-master/layout
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: v8emtdstg529g9b@jetable.org
The force-page-count does not work as expected for the end-on-odd and
end-on-even values.
As a side effect, the initial-page-number does not work either, as the
implementation uses force-page-count to simulate its effect.
There are two bugs-in-one here:
- The first page does not respect the force-page-count attribute
- Intermediate (ie. not first nor last) page-sequence erroneously implement the
end-on-* values by breaking at the first page, resulting in a first page being
empty, and the flow being shifted to the 2nd page.
The attached FO file, modified from the FAQ, demonstrates the issue. This file
specifies a document that should render 3 short page-sequence as follows:
- Page sequence 1 should be 2 pages: 1 first page with text, 1 blank page
- Page sequence 2 should be 2 pages: 1 first page with text, 1 blank page
- Page sequence 3 should be 2 pages: 1 first page with text, 1 blank page
FOP renders instead:
- Page sequence 1 is 1 page: 1 first page with text
- Page sequence 2 is 2 pages: 1 first page empty, 1 page with text
- Page sequence 3 is 3 pages: 1 first page empty, 1 page with text, 1 blank page
Note that the three page-sequence are strictly identical, and should therefore
be rendered exactly the same.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 42576] - force-page-count not working as expected
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42576
dev@cumiskey.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 42576] - force-page-count not working as expected
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42576
------- Additional Comments From v8emtdstg529g9b@jetable.org 2007-06-04 03:28 -------
Sample.fo that demonstrates the bug:
<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="first"
page-height="297mm" page-width="210mm"
margin-top="20mm" margin-bottom="20mm"
margin-left="25mm" margin-right="25mm">
<fo:region-body margin-bottom="20mm"/>
<fo:region-before region-name="header-normal" extent="10mm"/>
<fo:region-after region-name="footer-normal" extent="10mm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="normal"
page-height="297mm" page-width="210mm"
margin-top="20mm" margin-bottom="20mm"
margin-left="25mm" margin-right="25mm">
<fo:region-body margin-bottom="20mm"/>
<fo:region-after region-name="footer-normal" extent="10mm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="blank"
page-height="297mm" page-width="210mm"
margin-top="20mm" margin-bottom="20mm"
margin-left="25mm" margin-right="25mm">
<fo:region-body/>
<fo:region-before region-name="header-blank" extent="297mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="document">
<fo:single-page-master-reference master-reference="first"/>
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference blank-or-not-blank="not-blank"
master-reference="normal"/>
<fo:conditional-page-master-reference blank-or-not-blank="blank"
master-reference="blank"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="document" force-page-count="end-on-even">
<fo:static-content flow-name="footer-normal">
<fo:block text-align="center">Normal footer</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-normal">
<fo:block text-align="center">FIRST PAGE OF SEQUENCE</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-blank">
<fo:block space-before="100mm" text-align-last="center">
Intentionally left blank.</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
TEST
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="document" force-page-count="end-on-even">
<fo:static-content flow-name="footer-normal">
<fo:block text-align="center">Normal footer</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-normal">
<fo:block text-align="center">FIRST PAGE OF SEQUENCE</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-blank">
<fo:block space-before="100mm" text-align-last="center">
Intentionally left blank.</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
TEST
</fo:block>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="document" force-page-count="end-on-even">
<fo:static-content flow-name="footer-normal">
<fo:block text-align="center">Normal footer</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-normal">
<fo:block text-align="center">FIRST PAGE OF SEQUENCE</fo:block>
</fo:static-content>
<fo:static-content flow-name="header-blank">
<fo:block space-before="100mm" text-align-last="center">
Intentionally left blank.</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
TEST
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 42576] - force-page-count not working as expected
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42576
dev@cumiskey.com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|fop- |dev@cumiskey.com
|dev@xmlgraphics.apache.org |
------- Additional Comments From dev@cumiskey.com 2007-06-07 05:16 -------
Created an attachment (id=20321)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=20321&action=view)
patch file to fix page sequence master sequencing bug
This patch also includes some log bracing on the Files that required
modification, i.e.
log.trace("blah");
becomes...
if (log.isTraceEnabled()) {
log.trace("blah");
}
The problem as I saw it was that the subsequence position of the page sequence
master was being reset prior to the completion of processing the current
sequence. I have tested the fix with the sample FO you provided and also
carried out some of my own tests and I believe this now fixes the problem.
Adrian.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.