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 "(Ext.) Nicolas Salic" <Ni...@stef-tfe.com> on 2011/01/10 17:46:54 UTC

FOP 1.0 - properties which don't make same result than 0.20.5 version

Hi,

 

First, I'm french, so it's possible I write wrong english, but I'll try
to do the best I can.

 

I'm testing FOP 1.0 with stylesheets currently working with FOP 0.20.5,
and I get different results with two properties.

The height property at fo:table level doesn't give me the same result,
neither the border-style property at fo:table-column level.

 

Here is the code I use :

 

<?xml version="1.0" encoding="UTF-8"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>

<fo:simple-page-master margin="1cm" page-width="21cm"
page-height="29.7cm" master-name="A4Portrait">

<fo:region-body/>

</fo:simple-page-master>

</fo:layout-master-set>

<fo:page-sequence master-reference="A4Portrait">

<fo:flow flow-name="xsl-region-body">

<fo:table width="15cm" height="10cm" table-layout="fixed">

<fo:table-column border-width="thin" border-style="solid"
column-width="1cm"/>

<fo:table-column border-width="thin" border-style="solid"
column-width="2cm"/>

<fo:table-column border-width="thin" border-style="solid"
column-width="3cm"/>

<fo:table-column border-width="thin" border-style="solid"
column-width="4cm"/>

<fo:table-column border-width="thin" border-style="solid"
column-width="5cm"/>

<fo:table-body>

<fo:table-row>

<fo:table-cell number-columns-spanned="4" padding="2mm">

<fo:block>

Ceci est un texte sur plusieurs cellules

</fo:block>

</fo:table-cell>

</fo:table-row>

</fo:table-body>

</fo:table>

</fo:flow>

</fo:page-sequence>

</fo:root>

 

You can see the results with the two joined pdf files.

 

I would like to get the same result as I get today with 0.20.5 version.
I tried to bypass these problems, but I failed. 

Is there something I do wrong? Do you see a bypass solution?

 

Nicolas

 


RE: FOP 1.0 - properties which don't make same result than 0.20.5 version

Posted by "(Ext.) Nicolas Salic" <Ni...@stef-tfe.com>.
Hi Andreas,

Thanks a lot, this helps me.
I didn't know it was possible to stack areas, which is quite powerful. :-)

Regards.

-------------------------------------------------------------------------------------------------
 
Nicolas SALIC
Agrostar
DOP DEV
02.97.48.56.23 "Communication gratuite en interne !"
Theix
Rue Jacques Cartier, BP 165 Theix, 56005 Vannes Cedex, 56450 Theix

-----Message d'origine-----
De : Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Envoyé : lundi 10 janvier 2011 19:55
À : fop-users@xmlgraphics.apache.org
Objet : Re: FOP 1.0 - properties which don't make same result than 0.20.5 version

On 10 Jan 2011, at 17:46, (Ext.) Nicolas Salic wrote:

Hi Nicolas

> I'm testing FOP 1.0 with stylesheets currently working with FOP 0.20.5, and I get different results with two properties.
> The height property at fo:table level doesn't give me the same result, neither the border-style property at fo:table-column level.
>  
> Here is the code I use :
<snip />

As far as I know, in FOP 1.0:
- "height" or "block-progression-dimension" does not work at all on fo:table
- in case of cells spanning multiple colums, the specified column-borders are only painted on the cell's start & end (= left & right) edges

For the first issue, there is a quite straightforward workaround: specify "height" or "block-progression-dimension" on the one fo:table-row instead, where it does have the intended effect. Depending on the use case, you may want to use "min-height" if the table may still grow beyond the desired height.

For the second issue, the workaround is not so straightforward, but it could be feasible.

It looks slightly convoluted, but below is as close as I could get to your 0.20.5 output with FOP 1.0. Note that there seems to be a slight issue with the height of the row. In order to get it to match the height of the inner table exactly, I had to subtract the cell-padding, which does not seem entirely correct (?)

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master margin="1cm" page-width="21cm" page-height="29.7cm" master-name="A4Portrait">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="A4Portrait">
    <fo:flow flow-name="xsl-region-body">
      <fo:table width="150mm" table-layout="fixed" border="solid thin black">
        <fo:table-column />
        <fo:table-body>
          <fo:table-row height="96mm">
            <fo:table-cell padding="2mm">
              <fo:block>Ceci est un texte sur plusieurs cellules</fo:block>
              <fo:block-container absolute-position="absolute" top="0mm" left="-2mm">
                <fo:table width="15cm" table-layout="fixed">
                  <fo:table-column border="solid thin black" column-width="10mm"/>
                  <fo:table-column border="solid thin black" column-width="20mm"/>
                  <fo:table-column border="solid thin black" column-width="30mm"/>
                  <fo:table-column border="solid thin black" column-width="40mm"/>
                  <fo:table-column border="solid thin black" column-width="50mm"/>
                  <fo:table-body>
                    <fo:table-row height="100mm">
                      <fo:table-cell>
                        <fo:block />
                      </fo:table-cell>
                    </fo:table-row>
                  </fo:table-body>
                </fo:table>
              </fo:block-container>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Hope this helps!


Regards,

Andreas Delmelle
---


---------------------------------------------------------------------
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: FOP 1.0 - properties which don't make same result than 0.20.5 version

Posted by Andreas Delmelle <an...@telenet.be>.
On 10 Jan 2011, at 17:46, (Ext.) Nicolas Salic wrote:

Hi Nicolas

> I’m testing FOP 1.0 with stylesheets currently working with FOP 0.20.5, and I get different results with two properties.
> The height property at fo:table level doesn’t give me the same result, neither the border-style property at fo:table-column level.
>  
> Here is the code I use :
<snip />

As far as I know, in FOP 1.0:
- "height" or "block-progression-dimension" does not work at all on fo:table
- in case of cells spanning multiple colums, the specified column-borders are only painted on the cell's start & end (= left & right) edges

For the first issue, there is a quite straightforward workaround: specify "height" or "block-progression-dimension" on the one fo:table-row instead, where it does have the intended effect. Depending on the use case, you may want to use "min-height" if the table may still grow beyond the desired height.

For the second issue, the workaround is not so straightforward, but it could be feasible.

It looks slightly convoluted, but below is as close as I could get to your 0.20.5 output with FOP 1.0. Note that there seems to be a slight issue with the height of the row. In order to get it to match the height of the inner table exactly, I had to subtract the cell-padding, which does not seem entirely correct (?)

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master margin="1cm" page-width="21cm" page-height="29.7cm" master-name="A4Portrait">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="A4Portrait">
    <fo:flow flow-name="xsl-region-body">
      <fo:table width="150mm" table-layout="fixed" border="solid thin black">
        <fo:table-column />
        <fo:table-body>
          <fo:table-row height="96mm">
            <fo:table-cell padding="2mm">
              <fo:block>Ceci est un texte sur plusieurs cellules</fo:block>
              <fo:block-container absolute-position="absolute" top="0mm" left="-2mm">
                <fo:table width="15cm" table-layout="fixed">
                  <fo:table-column border="solid thin black" column-width="10mm"/>
                  <fo:table-column border="solid thin black" column-width="20mm"/>
                  <fo:table-column border="solid thin black" column-width="30mm"/>
                  <fo:table-column border="solid thin black" column-width="40mm"/>
                  <fo:table-column border="solid thin black" column-width="50mm"/>
                  <fo:table-body>
                    <fo:table-row height="100mm">
                      <fo:table-cell>
                        <fo:block />
                      </fo:table-cell>
                    </fo:table-row>
                  </fo:table-body>
                </fo:table>
              </fo:block-container>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Hope this helps!


Regards,

Andreas Delmelle
---


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