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 "Chakravarty, Abhishek" <Ab...@accidentfund.com> on 2008/12/18 16:24:11 UTC

table overflow onto page 2 into specific region

Hi

Is there a way to ensure in my stylesheet that a table overflows into
second page into the area which is prespecified for it only?

As in I have the page setup as the header followed by a table followed
by footer. But if the table overflows then is it possible to have it
onto the second page in the same region so that my second page would now
look like header followed by table (the content of which is from the
previous page table overflow) and then the footer.

Also none of the info is static i.e. headers and footers can change
depending on the content being pulled in from the xml (but the table
layout remains the same).

Regards
Abhishek

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


Populate table with blank cells/rows

Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
Is there a way to populate a table (which overflows onto page 2) with
empty rows/cells until a particular margin(..in this case until the
footer i.e. the region-after section) when the contents have already
been obtained from the xml? 

Sometimes data in the xml can wrap onto the next line in the resulting
pdf (as the column width is smaller in the table specs). So it creates a
problem where just simply counting the number of lines which have been
populated so far doesn't work.

Have tried setting a row height with blank data to make the empty row(s)
but setting a static height to fill is only possible when it is known
how much of the region -body has already been filled, which in this case
won't be possible to know due to the word wrapping issue. 

Regards
Abhishek



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



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



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


RE: table overflow onto page 2 into specific region

Posted by "Chakravarty, Abhishek" <Ab...@accidentfund.com>.
Thanks loads I put my header and footer into the region-before and
region-after of the page and problem solved (for now.)

-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Friday, December 19, 2008 3:27 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: table overflow onto page 2 into specific region

Not sure I've understood exactly what it is you need. But I'll try.

First of all, you simple need fo:table-header [1] and fo:table-footer 
[2] before your fo:table-body. That gives you headers and footers for
the table that is repeated on each page.

[1] http://www.w3.org/TR/xsl11/#fo_table-header
[2] http://www.w3.org/TR/xsl11/#fo_table-footer

An example:
          <fo:table table-layout="fixed" width="100%">
            <fo:table-column number-columns-repeated="2"
column-width="proportional-column-width(1)"/>
            <fo:table-header>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>header1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>header2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-header>
            <fo:table-footer>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>footer1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>footer2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-footer>
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>cell1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell2</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>cell3</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell4</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>

Only now, it's getting tricky. You say you need changing content in the
header and footer. That's what table-markers [3][4] from XSL 1.1 are
for.
But unfortunately, this hasn't been implemented, yet. So the only thing
you can try is putting your header and footer content in the
region-before and the region-after of the page. There you can work with
fo:retrieve-marker [5] to access content you specify in fo:marker [6]
elements.

[3] http://www.w3.org/TR/xsl11/#fo_retrieve-table-marker
[4] http://www.w3.org/TR/xsl11/#d0e14681
[5] http://www.w3.org/TR/xsl11/#fo_retrieve-marker
[6] http://www.w3.org/TR/xsl11/#fo_marker

HTH

On 18.12.2008 16:24:11 Chakravarty, Abhishek wrote:
> Hi
> 
> Is there a way to ensure in my stylesheet that a table overflows into
> second page into the area which is prespecified for it only?
> 
> As in I have the page setup as the header followed by a table followed
> by footer. But if the table overflows then is it possible to have it
> onto the second page in the same region so that my second page would
now
> look like header followed by table (the content of which is from the
> previous page table overflow) and then the footer.
> 
> Also none of the info is static i.e. headers and footers can change
> depending on the content being pulled in from the xml (but the table
> layout remains the same).
> 
> Regards
> Abhishek




Jeremias Maerki


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



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


Re: table overflow onto page 2 into specific region

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Not sure I've understood exactly what it is you need. But I'll try.

First of all, you simple need fo:table-header [1] and fo:table-footer 
[2] before your fo:table-body. That gives you headers and footers for
the table that is repeated on each page.

[1] http://www.w3.org/TR/xsl11/#fo_table-header
[2] http://www.w3.org/TR/xsl11/#fo_table-footer

An example:
          <fo:table table-layout="fixed" width="100%">
            <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
            <fo:table-header>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>header1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>header2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-header>
            <fo:table-footer>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>footer1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>footer2</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-footer>
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>cell1</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell2</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row>
                <fo:table-cell>
                  <fo:block>cell3</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell4</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>

Only now, it's getting tricky. You say you need changing content in the
header and footer. That's what table-markers [3][4] from XSL 1.1 are for.
But unfortunately, this hasn't been implemented, yet. So the only thing
you can try is putting your header and footer content in the
region-before and the region-after of the page. There you can work with
fo:retrieve-marker [5] to access content you specify in fo:marker [6]
elements.

[3] http://www.w3.org/TR/xsl11/#fo_retrieve-table-marker
[4] http://www.w3.org/TR/xsl11/#d0e14681
[5] http://www.w3.org/TR/xsl11/#fo_retrieve-marker
[6] http://www.w3.org/TR/xsl11/#fo_marker

HTH

On 18.12.2008 16:24:11 Chakravarty, Abhishek wrote:
> Hi
> 
> Is there a way to ensure in my stylesheet that a table overflows into
> second page into the area which is prespecified for it only?
> 
> As in I have the page setup as the header followed by a table followed
> by footer. But if the table overflows then is it possible to have it
> onto the second page in the same region so that my second page would now
> look like header followed by table (the content of which is from the
> previous page table overflow) and then the footer.
> 
> Also none of the info is static i.e. headers and footers can change
> depending on the content being pulled in from the xml (but the table
> layout remains the same).
> 
> Regards
> Abhishek




Jeremias Maerki


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