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 Miroslav Pukhalsky <mi...@dekasoft.com.ua> on 2007/03/12 17:40:41 UTC

Problem with table "margin-left" property

Hi there,

I have next code:
<fo:table table-layout="fixed" width="100%" margin-left="10mm">

But in PDF I got 20mm left margin instead 10mm! May be it something 
wrong? I use FOP 0.93.

Regards,

Miroslav.

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


Re: Problem with table "margin-left" property

Posted by Miroslav Pukhalsky <mi...@dekasoft.com.ua>.
Hi Jeremias,
Jeremias Maerki wrote:
> No bug. Miroslav, please set start-indent="0pt" and end-indent="0pt" on
> the table-body. That should get it right. Note, this is a weirdness of
> the FO spec, not in FOP (all described in the Wiki).
> 
It's working! Thanks a lot!

Regards,

Miroslav.

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


Re: Problem with table "margin-left" property

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 12.03.2007 18:50:32 Andreas L Delmelle wrote:
> On Mar 12, 2007, at 18:25, Miroslav Pukhalsky wrote:
> 
> Hi Miroslav,
> 
> > Andreas L Delmelle wrote:
> >> Check the margin or indent on the parent (or ancestor) block.
> >
> > Parent (or ancestor) block has no any indents.
> >
> > But I tried resolve my in the another way:
> <snip />
> >                     <fo:block margin-left="10mm">
> >                         <fo:block font-size="120%" font-weight="bold">
> >                             TEXT
> >                         </fo:block>
> >
> >                         <fo:table table-layout="fixed" width="100%">
> >                             <!-- skip body -->
> >                         </fo:table>
> >                     </fo:block>
> <snip />
> >
> > And text from block has margin 10 mm but table has margin 20 mm.
> 
> The indent-computation on that block seems to be correct, as it  
> inherits the 10mm specified on the parent block.
> 
> The fact that the table is offset by double that amount, seems to be  
> a bug, though...

No bug. Miroslav, please set start-indent="0pt" and end-indent="0pt" on
the table-body. That should get it right. Note, this is a weirdness of
the FO spec, not in FOP (all described in the Wiki).

If you want the behaviour you'd expect (without the above work-around)
but can live with the fact that you're activating non-compliant
behaviour you can enable the break-indent-inheritance setting to "true"
in the configuration.

> I'm going to have a closer look at this as soon as I find the time.

No need. :-)


Jeremias Maerki


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


Re: Problem with table "margin-left" property

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 12, 2007, at 18:25, Miroslav Pukhalsky wrote:

Hi Miroslav,

> Andreas L Delmelle wrote:
>> Check the margin or indent on the parent (or ancestor) block.
>
> Parent (or ancestor) block has no any indents.
>
> But I tried resolve my in the another way:
<snip />
>                     <fo:block margin-left="10mm">
>                         <fo:block font-size="120%" font-weight="bold">
>                             TEXT
>                         </fo:block>
>
>                         <fo:table table-layout="fixed" width="100%">
>                             <!-- skip body -->
>                         </fo:table>
>                     </fo:block>
<snip />
>
> And text from block has margin 10 mm but table has margin 20 mm.

The indent-computation on that block seems to be correct, as it  
inherits the 10mm specified on the parent block.

The fact that the table is offset by double that amount, seems to be  
a bug, though...

I'm going to have a closer look at this as soon as I find the time.



Andreas


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


Re: Problem with table "margin-left" property

Posted by Miroslav Pukhalsky <mi...@dekasoft.com.ua>.
Hi Andreas,

Andreas L Delmelle wrote:
> 
> Check the margin or indent on the parent (or ancestor) block.
> 

Parent (or ancestor) block has no any indents.

But I tried resolve my in the another way:
     <xsl:template match="/">
         <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 font-family="sans-serif" font-size="6pt">
             <fo:layout-master-set>
                 <fo:simple-page-master master-name="main"
                                     page-width="210mm"
                                     page-height="297mm"
                                     margin-top="5mm"
                                     margin-bottom="5mm"
                                     margin-left="5mm"
                                     margin-right="5mm">
                     <fo:region-body />
                 </fo:simple-page-master>
             </fo:layout-master-set>

             <fo:page-sequence master-reference="main">
                 <fo:flow flow-name="xsl-region-body">
                     <fo:block margin-left="10mm">
                         <fo:block font-size="120%" font-weight="bold">
                             TEXT
                         </fo:block>

                         <fo:table table-layout="fixed" width="100%">
                             <!-- skip body -->
                         </fo:table>
                     </fo:block>
                 </fo:flow>
             </fo:page-sequence>
         </fo:root>
     </xsl:template>

And text from block has margin 10 mm but table has margin 20 mm.

Regards,
Miroslav

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


Re: Problem with table "margin-left" property

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 12, 2007, at 17:40, Miroslav Pukhalsky wrote:

> I have next code:
> <fo:table table-layout="fixed" width="100%" margin-left="10mm">

Check the margin or indent on the parent (or ancestor) block.

Big chance that the problem is described here:
http://wiki.apache.org/xmlgraphics-fop/IndentInheritance


HTH!

Cheers,

Andreas

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