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 Ra...@cgi.ca on 2002/03/28 21:06:07 UTC

Headers

I am trying to do the following:


Run Date:2002/03/29                                          Some Report
Name                                           Time:hh:mm:ss
               ^                          ^                             ^
      left justified                      Centered on page
Right justified

This information is in a header

How would you do this???

Thanks

Ravi Narine
Senior Architect
Banking & Investments
SI&C
CGI Group Inc.
416-304-7555
Ravi.Narine@cgi.ca


Re: Headers

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Ravi.Narine@cgi.ca wrote:
> I am trying to do the following:
> 
> 
> Run Date:2002/03/29                                          Some Report
> Name                                           Time:hh:mm:ss
>                ^                          ^                             ^
>       left justified                      Centered on page
> Right justified
> 
> This information is in a header

Complicated layouts can be done with a blind table
(a table without border and grid lines)

Try something like this:
  <fo:table layout="fixed">
    <fo:table-column column-width="30mm"/>
    <fo:table-column column-width="60mm"/>
    <fo:table-column column-width="30mm"/>
    <fo:table-body>
      <fo:table-row>
        <fo:table-cell>
          <fo:block text-align="start">Run Date:2002/03/29</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block text-align="center">Some Report Name</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block text-align="end">Time:hh:mm:ss</fo:block>
        </fo:table-cell>
       </fo:table-row>
    </fo:table-body>
  </fo:table>
Adjust the column widths to fit your page. Have also a look at
the possibility to define proportional column widths, the following
will produce three columns of equal width. Note that you have
to set the total width for the table.
  <fo:table layout="fixed" width="22.3cm">
    <fo:table-column column-width="proportional-column-width(1)"/>
    <fo:table-column column-width="proportional-column-width(1)"/>
    <fo:table-column column-width="proportional-column-width(1)"/>

HTH
J.Pietschmann