You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ken Johnson <ke...@gmail.com> on 2005/08/18 21:47:18 UTC

Pagination Problem

Hello,

I am having a pagination problem with FOP 0.20.5.  The problem occurs
when the entire contents of a table row does not fit on a page.  A new
page seems to be generated but the table row's content is not rendered
on the new page.  It seems to be rendered on the previous page even
though it presumably would not fit.  I believe this is a previously
reported bug.  In the event that this is the final table row
containing content, the resulting document will have an extra blank
page.  Very undesirable indeed.  The following example illustrates the
problem.  Row 2 is rendered on the first page and a blank second page
is created.  If a third row is added to the table, it gets rendered on
the second page and the document appears correct.

Does anyone know of  possible a workaround for the problem?  Any help
is greatly appreciated.

Thanks,
Ken 




<?xml version="1.0" encoding="ISO-8859-1" ?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master 
        page-width="8.5in" 
        page-height="11in"
        margin-right=".25in" 
        margin-left=".25in" 
        margin-top=".25in"
        margin-bottom=".25in"   
        master-name="ThePage">
      <fo:region-body margin-top="5in" margin-bottom="5in"/>
    </fo:simple-page-master>    
  
    <fo:page-sequence-master master-name="repeating">
      <fo:repeatable-page-master-reference master-reference="ThePage"/>
    </fo:page-sequence-master>    
  </fo:layout-master-set>
  
  <fo:page-sequence master-reference="repeating" 
      language="en" 
      hyphenate="true" 
      initial-page-number="1" 
      force-page-count="no-force">
    <fo:flow flow-name="xsl-region-body">         
      <fo:block>
        <fo:table width="5in" table-layout="fixed">
          <fo:table-column column-number="1"
column-width="proportional-column-width(100)"/>
            <fo:table-body>
              <fo:table-row keep-together="always">
                <fo:table-cell column-number="1">
                  <fo:block text-align="left" >This is row 1</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row keep-together="always">
                <fo:table-cell column-number="1">
                  <fo:block text-align="left" >This is row 2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
        </fo:table>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Pagination Problem

Posted by Sonja Löhr <so...@arcor.de>.
Thanks, Jeremias!

My customer finally prefered a one-column layout, so I didn't see the
error again. But theoretically, it could still occur, since the first
page still has this box in its region-start. 
If I revisit that project in the next days, I'll try to reproduce the
error and get an output of the FP tree - by the time I wait for other
errors to be reported by my customer ;-)


Am Freitag, den 19.08.2005, 09:27 +0200 schrieb Jeremias Maerki:
> I can confirm Ken's problem, but I don't have any work-around, I'm
> afraid. It's probably a bug but one that's not going to be fixed. I can
> also confirm that this particular problem doesn't occur in the current
> development code (as if that would help, sorry).
> 
> Sonja's problem seems to be something else. It would help to have an FO
> file to reproduce it. Anyway, the thing she describes will not be
> possible for some time with the development code (for the devs: changing
> available IPD problem). This is quite tricky stuff for us coders. To
> avoid any problems you should put the headline page and the following
> pages in a different page-sequence and try not to have to flow content
> from the first to the second page. That should work for both FOP
> versions.
> 
> On 19.08.2005 09:13:13 Sonja Löhr wrote:
> > 
> > Hi!
> > 
> > I can't help ;-(, but for those who can, I just want to add a related
> > observation:
> > I put each headline in a table together with the following paragraph,
> > with keep-with-next and keep-together, the table should have a width of
> > 100%.
> > If a page break occured before such a table (and only then), FOP seemed
> > to not recognize it early enough: The table indeed displayed on the next
> > page, but the percentual width is  100% of the width in the previous
> > page.
> > 
> > (I used 2 columns on pages greater than 1 and some box in region-start
> > of the first page, so the text-width differed.)
> > 
> > Regards,
> > sonja
> > 
> > 
> > 
> > Am Donnerstag, den 18.08.2005, 12:47 -0700 schrieb Ken Johnson:
> > > Hello,
> > > 
> > > I am having a pagination problem with FOP 0.20.5.  The problem occurs
> > > when the entire contents of a table row does not fit on a page.  A new
> > > page seems to be generated but the table row's content is not rendered
> > > on the new page.  It seems to be rendered on the previous page even
> > > though it presumably would not fit.  I believe this is a previously
> > > reported bug.  In the event that this is the final table row
> > > containing content, the resulting document will have an extra blank
> > > page.  Very undesirable indeed.  The following example illustrates the
> > > problem.  Row 2 is rendered on the first page and a blank second page
> > > is created.  If a third row is added to the table, it gets rendered on
> > > the second page and the document appears correct.
> > > 
> > > Does anyone know of  possible a workaround for the problem?  Any help
> > > is greatly appreciated.
> > > 
> > > Thanks,
> > > Ken 
> > > 
> > > 
> > > 
> > > 
> > > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> > >   <fo:layout-master-set>
> > >     <fo:simple-page-master 
> > >         page-width="8.5in" 
> > >         page-height="11in"
> > >         margin-right=".25in" 
> > >         margin-left=".25in" 
> > >         margin-top=".25in"
> > >         margin-bottom=".25in"   
> > >         master-name="ThePage">
> > >       <fo:region-body margin-top="5in" margin-bottom="5in"/>
> > >     </fo:simple-page-master>    
> > >   
> > >     <fo:page-sequence-master master-name="repeating">
> > >       <fo:repeatable-page-master-reference master-reference="ThePage"/>
> > >     </fo:page-sequence-master>    
> > >   </fo:layout-master-set>
> > >   
> > >   <fo:page-sequence master-reference="repeating" 
> > >       language="en" 
> > >       hyphenate="true" 
> > >       initial-page-number="1" 
> > >       force-page-count="no-force">
> > >     <fo:flow flow-name="xsl-region-body">         
> > >       <fo:block>
> > >         <fo:table width="5in" table-layout="fixed">
> > >           <fo:table-column column-number="1"
> > > column-width="proportional-column-width(100)"/>
> > >             <fo:table-body>
> > >               <fo:table-row keep-together="always">
> > >                 <fo:table-cell column-number="1">
> > >                   <fo:block text-align="left" >This is row 1</fo:block>
> > >                 </fo:table-cell>
> > >               </fo:table-row>
> > >               <fo:table-row keep-together="always">
> > >                 <fo:table-cell column-number="1">
> > >                   <fo:block text-align="left" >This is row 2</fo:block>
> > >                 </fo:table-cell>
> > >               </fo:table-row>
> > >             </fo:table-body>
> > >         </fo:table>
> > >       </fo:block>
> > >     </fo:flow>
> > >   </fo:page-sequence>
> > > </fo:root>
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > > 
> > -- 
> > Sonja Löhr <so...@arcor.de>
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
-- 
Sonja Löhr <so...@arcor.de>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Pagination Problem

Posted by Jeremias Maerki <de...@greenmail.ch>.
I can confirm Ken's problem, but I don't have any work-around, I'm
afraid. It's probably a bug but one that's not going to be fixed. I can
also confirm that this particular problem doesn't occur in the current
development code (as if that would help, sorry).

Sonja's problem seems to be something else. It would help to have an FO
file to reproduce it. Anyway, the thing she describes will not be
possible for some time with the development code (for the devs: changing
available IPD problem). This is quite tricky stuff for us coders. To
avoid any problems you should put the headline page and the following
pages in a different page-sequence and try not to have to flow content
from the first to the second page. That should work for both FOP
versions.

On 19.08.2005 09:13:13 Sonja Löhr wrote:
> 
> Hi!
> 
> I can't help ;-(, but for those who can, I just want to add a related
> observation:
> I put each headline in a table together with the following paragraph,
> with keep-with-next and keep-together, the table should have a width of
> 100%.
> If a page break occured before such a table (and only then), FOP seemed
> to not recognize it early enough: The table indeed displayed on the next
> page, but the percentual width is  100% of the width in the previous
> page.
> 
> (I used 2 columns on pages greater than 1 and some box in region-start
> of the first page, so the text-width differed.)
> 
> Regards,
> sonja
> 
> 
> 
> Am Donnerstag, den 18.08.2005, 12:47 -0700 schrieb Ken Johnson:
> > Hello,
> > 
> > I am having a pagination problem with FOP 0.20.5.  The problem occurs
> > when the entire contents of a table row does not fit on a page.  A new
> > page seems to be generated but the table row's content is not rendered
> > on the new page.  It seems to be rendered on the previous page even
> > though it presumably would not fit.  I believe this is a previously
> > reported bug.  In the event that this is the final table row
> > containing content, the resulting document will have an extra blank
> > page.  Very undesirable indeed.  The following example illustrates the
> > problem.  Row 2 is rendered on the first page and a blank second page
> > is created.  If a third row is added to the table, it gets rendered on
> > the second page and the document appears correct.
> > 
> > Does anyone know of  possible a workaround for the problem?  Any help
> > is greatly appreciated.
> > 
> > Thanks,
> > Ken 
> > 
> > 
> > 
> > 
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >   <fo:layout-master-set>
> >     <fo:simple-page-master 
> >         page-width="8.5in" 
> >         page-height="11in"
> >         margin-right=".25in" 
> >         margin-left=".25in" 
> >         margin-top=".25in"
> >         margin-bottom=".25in"   
> >         master-name="ThePage">
> >       <fo:region-body margin-top="5in" margin-bottom="5in"/>
> >     </fo:simple-page-master>    
> >   
> >     <fo:page-sequence-master master-name="repeating">
> >       <fo:repeatable-page-master-reference master-reference="ThePage"/>
> >     </fo:page-sequence-master>    
> >   </fo:layout-master-set>
> >   
> >   <fo:page-sequence master-reference="repeating" 
> >       language="en" 
> >       hyphenate="true" 
> >       initial-page-number="1" 
> >       force-page-count="no-force">
> >     <fo:flow flow-name="xsl-region-body">         
> >       <fo:block>
> >         <fo:table width="5in" table-layout="fixed">
> >           <fo:table-column column-number="1"
> > column-width="proportional-column-width(100)"/>
> >             <fo:table-body>
> >               <fo:table-row keep-together="always">
> >                 <fo:table-cell column-number="1">
> >                   <fo:block text-align="left" >This is row 1</fo:block>
> >                 </fo:table-cell>
> >               </fo:table-row>
> >               <fo:table-row keep-together="always">
> >                 <fo:table-cell column-number="1">
> >                   <fo:block text-align="left" >This is row 2</fo:block>
> >                 </fo:table-cell>
> >               </fo:table-row>
> >             </fo:table-body>
> >         </fo:table>
> >       </fo:block>
> >     </fo:flow>
> >   </fo:page-sequence>
> > </fo:root>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> -- 
> Sonja Löhr <so...@arcor.de>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Pagination Problem

Posted by Sonja Löhr <so...@arcor.de>.
Hi!

I can't help ;-(, but for those who can, I just want to add a related
observation:
I put each headline in a table together with the following paragraph,
with keep-with-next and keep-together, the table should have a width of
100%.
If a page break occured before such a table (and only then), FOP seemed
to not recognize it early enough: The table indeed displayed on the next
page, but the percentual width is  100% of the width in the previous
page.

(I used 2 columns on pages greater than 1 and some box in region-start
of the first page, so the text-width differed.)

Regards,
sonja



Am Donnerstag, den 18.08.2005, 12:47 -0700 schrieb Ken Johnson:
> Hello,
> 
> I am having a pagination problem with FOP 0.20.5.  The problem occurs
> when the entire contents of a table row does not fit on a page.  A new
> page seems to be generated but the table row's content is not rendered
> on the new page.  It seems to be rendered on the previous page even
> though it presumably would not fit.  I believe this is a previously
> reported bug.  In the event that this is the final table row
> containing content, the resulting document will have an extra blank
> page.  Very undesirable indeed.  The following example illustrates the
> problem.  Row 2 is rendered on the first page and a blank second page
> is created.  If a third row is added to the table, it gets rendered on
> the second page and the document appears correct.
> 
> Does anyone know of  possible a workaround for the problem?  Any help
> is greatly appreciated.
> 
> Thanks,
> Ken 
> 
> 
> 
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>   <fo:layout-master-set>
>     <fo:simple-page-master 
>         page-width="8.5in" 
>         page-height="11in"
>         margin-right=".25in" 
>         margin-left=".25in" 
>         margin-top=".25in"
>         margin-bottom=".25in"   
>         master-name="ThePage">
>       <fo:region-body margin-top="5in" margin-bottom="5in"/>
>     </fo:simple-page-master>    
>   
>     <fo:page-sequence-master master-name="repeating">
>       <fo:repeatable-page-master-reference master-reference="ThePage"/>
>     </fo:page-sequence-master>    
>   </fo:layout-master-set>
>   
>   <fo:page-sequence master-reference="repeating" 
>       language="en" 
>       hyphenate="true" 
>       initial-page-number="1" 
>       force-page-count="no-force">
>     <fo:flow flow-name="xsl-region-body">         
>       <fo:block>
>         <fo:table width="5in" table-layout="fixed">
>           <fo:table-column column-number="1"
> column-width="proportional-column-width(100)"/>
>             <fo:table-body>
>               <fo:table-row keep-together="always">
>                 <fo:table-cell column-number="1">
>                   <fo:block text-align="left" >This is row 1</fo:block>
>                 </fo:table-cell>
>               </fo:table-row>
>               <fo:table-row keep-together="always">
>                 <fo:table-cell column-number="1">
>                   <fo:block text-align="left" >This is row 2</fo:block>
>                 </fo:table-cell>
>               </fo:table-row>
>             </fo:table-body>
>         </fo:table>
>       </fo:block>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
-- 
Sonja Löhr <so...@arcor.de>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org