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 Denis Perchine <dy...@perchine.com> on 2001/04/18 18:46:23 UTC

Problem drawing tables

Hello,

I am a new one here.
I try to draw a table which consists only of empty cells.
But somehow I got table with correct width, but height of cells are very 
small (1mm). It looks like I forget something... Any comments?

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
  <fo:layout-master-set>
    <fo:simple-page-master master-name="simple" page-height="29.7cm" 
page-width="21cm"
                           margin-top="7mm" margin-bottom="0cm" 
margin-left="4mm" margin-right="0cm">
      <fo:region-body margin-top="0cm"/>
      <fo:region-before extent="0cm"/>
      <fo:region-after extent="0cm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
 
  <fo:page-sequence master-name="simple">
 
    <fo:flow flow-name="xsl-region-body">
 
      <fo:table border-width="0.34mm" border-color="black" 
border-style="solid">
        <fo:table-column column-width="203.20mm"/>
        <fo:table-body>
          <fo:table-row height="8.47mm">
            <fo:table-cell width="203.20mm" height="8.47mm" 
border-width="0.34mm" border-color="black" border-style="solid">
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row height="46.57mm">
            <fo:table-cell width="203.20mm" height="46.57mm" 
border-width="0.34mm" border-color="black" border-style="solid">
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row height="127.00mm">
            <fo:table-cell width="203.20mm" height="127.00mm" 
border-width="0.34mm" border-color="black" border-style="solid">
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
 
  </fo:page-sequence>
</fo:root>

-- 
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp@perchine.com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Problem drawing tables

Posted by Karen Lease <ka...@club-internet.fr>.
Hi Denis,

It's not that you have forgotten something, but rather that the width
and height properties aren't yet implemented for table-row or
table-cell. Using the table-column FO with the column-width property
will give you the width; you don't need to repeat it on each cell. And
"height" _should_ work on table-row; it just isn't done yet.
Try putting a block in each cell and setting the line-height. You need
to put some non-space character in the block; a non-breaking space
(unicode 160) works for me. Something like this (adjust the line-height
as necessary.)

<fo:table-cell ....>
  <fo:block line-height="8mm">&#160;</fo:block>
</fo:table-cell>

Hope the workaround helps you out,
Karen Lease

Denis Perchine wrote:
> 
> Hello,
> 
> I am a new one here.
> I try to draw a table which consists only of empty cells.
> But somehow I got table with correct width, but height of cells are very
> small (1mm). It looks like I forget something... Any comments?
> 
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> 
>   <fo:layout-master-set>
>     <fo:simple-page-master master-name="simple" page-height="29.7cm"
> page-width="21cm"
>                            margin-top="7mm" margin-bottom="0cm"
> margin-left="4mm" margin-right="0cm">
>       <fo:region-body margin-top="0cm"/>
>       <fo:region-before extent="0cm"/>
>       <fo:region-after extent="0cm"/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
> 
>   <fo:page-sequence master-name="simple">
> 
>     <fo:flow flow-name="xsl-region-body">
> 
>       <fo:table border-width="0.34mm" border-color="black"
> border-style="solid">
>         <fo:table-column column-width="203.20mm"/>
>         <fo:table-body>
>           <fo:table-row height="8.47mm">
>             <fo:table-cell width="203.20mm" height="8.47mm"
> border-width="0.34mm" border-color="black" border-style="solid">
>             </fo:table-cell>
>           </fo:table-row>
>           <fo:table-row height="46.57mm">
>             <fo:table-cell width="203.20mm" height="46.57mm"
> border-width="0.34mm" border-color="black" border-style="solid">
>             </fo:table-cell>
>           </fo:table-row>
>           <fo:table-row height="127.00mm">
>             <fo:table-cell width="203.20mm" height="127.00mm"
> border-width="0.34mm" border-color="black" border-style="solid">
>             </fo:table-cell>
>           </fo:table-row>
>         </fo:table-body>
>       </fo:table>
>     </fo:flow>
> 
>   </fo:page-sequence>
> </fo:root>
> 
> --
> Sincerely Yours,
> Denis Perchine
> 
> ----------------------------------
> E-Mail: dyp@perchine.com
> HomePage: http://www.perchine.com/dyp/
> FidoNet: 2:5000/120.5
> ----------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org