Re: problem positioning the footer at the bottom of the page

Frank Erlbacher <[email protected]> Wed, 26 Jun 2024 12:56:34 +0200
Newsgroups gmane.text.xml.xfc.general
Message-ID <CABNwboLYdce9_s9ozXGdPgCNtw4xF+onv3Dufq75+NpOOz6iFg@mail.gmail.com>
--===============5925206706595353629==
Content-Type: multipart/alternative; boundary="000000000000ccbe16061bc8de54"

--000000000000ccbe16061bc8de54
Content-Type: text/plain; charset="UTF-8"

Thanks for your help, now it works fine for me.

Regards
Frank

Am Mi., 26. Juni 2024 um 12:24 Uhr schrieb Hussein Shafie <
[email protected]>:

> On 6/25/24 13:24, Frank Erlbacher wrote:
> > I'd like to get my footer as close as possible to the lower bound of the
> > page. Therefore I set the margin-bottom to 0. But it doesn't work. In my
> > rendered RTF-Result the distance between my footer row and the lower
> > bound is round about 1.5cm.
> > If I render it with apache fop to PDF, all is fine.
> >
> > <fo:layout-master-set>
> >    <fo:simple-page-master margin-left="2.499431cm" master-name="spm37"
> > page-height="29.7004cm" margin-top="1.25cm" *margin-bottom="0cm*"
> >   page-width="21.0009cm" margin-right="2.499431cm">
> >      <fo:region-body margin-top="1.25cm" margin-bottom="2cm"/>
> >      <fo:region-after extent="2cm" overflow="visible"
> > display-align="after" precedence="true"/>
> >    </fo:simple-page-master>
> > </fo:layout-master-set>
> >
> > <fo:page-sequence master-reference="spm37" language="de"
> hyphenate="false">
> >    <fo:static-content flow-name="xsl-region-after">
> >     <fo:block font-size="11pt" language="de" line-height="12.65pt"
> > font-family="Calibri" orphans="2" widows="2">That is my footer</fo:block>
> > </fo:static-content>
> > ...
> >
> > How can I fix this problem?
> >
>
> Unlike Apache FOP, XMLmind XSL-FO Converter (XFC for short) has no way
> to really support the margins of fo:simple-page-master and fo:region-body.
>
> Therefore, XFC merely translates these XSL-FO margins to what is
> supported by the RTF format, that is, the top margin of the page and the
> bottom margin of the page.
>
> In order to do that, XFC ADDS fo:simple-page-master/@margin-top and
> fo:region-body/@margin-top to specify the RTF top margin of the page. It
> adds fo:simple-page-master/@margin-bottom and
> fo:region-body/@margin-bottom to specify the RTF bottom margin of the page.
>
> Therefore, what follows should give you the results you want:
> ---
>    <fo:simple-page-master margin-left="2.499431cm" master-name="spm37"
> page-height="29.7004cm" margin-top="1.25cm" margin-bottom="0cm"
> page-width="21.0009cm" margin-right="2.499431cm">
>     <fo:region-body margin-top="1.25cm" margin-bottom="0cm"/>
>     <fo:region-after extent="2cm" overflow="visible"
> display-align="after" precedence="true"/>
>    </fo:simple-page-master>
> ---
>
> Unfortunately, when investigating this issue, I've found a bug which,
> for now, prevents you from specifying margin-bottom="0cm" twice.
>
> The workwaround is to specify a very small value, e.g.
> margin-bottom="0.05cm", like below (attached .fo file):
> ---
>    <fo:simple-page-master margin-left="2.499431cm" master-name="spm37"
> page-height="29.7004cm" margin-top="1.25cm" margin-bottom="0.05cm"
> page-width="21.0009cm" margin-right="2.499431cm">
>     <fo:region-body margin-top="1.25cm" margin-bottom="0.05cm"/>
>     <fo:region-after extent="2cm" overflow="visible"
> display-align="after" precedence="true"/>
>    </fo:simple-page-master>
> ---
>
> This should give you the results very close to what you want. See
> attached screenshot.
>

--000000000000ccbe16061bc8de54
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks for your help, now it works fine for me.<div><br></=
div><div>Regards</div><div>Frank</div></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">Am Mi., 26. Juni 2024 um 12:24=C2=A0U=
hr schrieb Hussein Shafie &lt;<a href=3D"mailto:[email protected]">hussei=
[email protected]</a>&gt;:<br></div><blockquote class=3D"gmail_quote" style=3D"=
margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef=
t:1ex">On 6/25/24 13:24, Frank Erlbacher wrote:<br>
&gt; I&#39;d like to get my footer as close as=C2=A0possible to the lower b=
ound of the <br>
&gt; page. Therefore=C2=A0I set the margin-bottom to 0. But it doesn&#39;t =
work. In my <br>
&gt; rendered RTF-Result the distance between my footer row and the lower <=
br>
&gt; bound is round about 1.5cm.<br>
&gt; If I render it with apache fop to PDF, all is fine.<br>
&gt; <br>
&gt; &lt;fo:layout-master-set&gt;<br>
&gt;=C2=A0 =C2=A0 &lt;fo:simple-page-master margin-left=3D&quot;2.499431cm&=
quot; master-name=3D&quot;spm37&quot; <br>
&gt; page-height=3D&quot;29.7004cm&quot; margin-top=3D&quot;1.25cm&quot; *m=
argin-bottom=3D&quot;0cm*&quot;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0page-width=3D&quot;21.0009cm&quot; margin-right=3D&quot;2.=
499431cm&quot;&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 &lt;fo:region-body margin-top=3D&quot;1.25cm&quot;=
 margin-bottom=3D&quot;2cm&quot;/&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 &lt;fo:region-after extent=3D&quot;2cm&quot; overf=
low=3D&quot;visible&quot; <br>
&gt; display-align=3D&quot;after&quot; precedence=3D&quot;true&quot;/&gt;<b=
r>
&gt;=C2=A0 =C2=A0 &lt;/fo:simple-page-master&gt;<br>
&gt; &lt;/fo:layout-master-set&gt;<br>
&gt; <br>
&gt; &lt;fo:page-sequence master-reference=3D&quot;spm37&quot; language=3D&=
quot;de&quot; hyphenate=3D&quot;false&quot;&gt;<br>
&gt;=C2=A0 =C2=A0 &lt;fo:static-content flow-name=3D&quot;xsl-region-after&=
quot;&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0&lt;fo:block font-size=3D&quot;11pt&quot; language=
=3D&quot;de&quot; line-height=3D&quot;12.65pt&quot; <br>
&gt; font-family=3D&quot;Calibri&quot; orphans=3D&quot;2&quot; widows=3D&qu=
ot;2&quot;&gt;That is my footer&lt;/fo:block&gt;<br>
&gt; &lt;/fo:static-content&gt;<br>
&gt; ...<br>
&gt; <br>
&gt; How can I fix this problem?<br>
&gt; <br>
<br>
Unlike Apache FOP, XMLmind XSL-FO Converter (XFC for short) has no way <br>
to really support the margins of fo:simple-page-master and fo:region-body.<=
br>
<br>
Therefore, XFC merely translates these XSL-FO margins to what is <br>
supported by the RTF format, that is, the top margin of the page and the <b=
r>
bottom margin of the page.<br>
<br>
In order to do that, XFC ADDS fo:simple-page-master/@margin-top and <br>
fo:region-body/@margin-top to specify the RTF top margin of the page. It <b=
r>
adds fo:simple-page-master/@margin-bottom and <br>
fo:region-body/@margin-bottom to specify the RTF bottom margin of the page.=
<br>
<br>
Therefore, what follows should give you the results you want:<br>
---<br>
=C2=A0 =C2=A0&lt;fo:simple-page-master margin-left=3D&quot;2.499431cm&quot;=
 master-name=3D&quot;spm37&quot; <br>
page-height=3D&quot;29.7004cm&quot; margin-top=3D&quot;1.25cm&quot; margin-=
bottom=3D&quot;0cm&quot; <br>
page-width=3D&quot;21.0009cm&quot; margin-right=3D&quot;2.499431cm&quot;&gt=
;<br>
=C2=A0 =C2=A0 &lt;fo:region-body margin-top=3D&quot;1.25cm&quot; margin-bot=
tom=3D&quot;0cm&quot;/&gt;<br>
=C2=A0 =C2=A0 &lt;fo:region-after extent=3D&quot;2cm&quot; overflow=3D&quot=
;visible&quot; <br>
display-align=3D&quot;after&quot; precedence=3D&quot;true&quot;/&gt;<br>
=C2=A0 =C2=A0&lt;/fo:simple-page-master&gt;<br>
---<br>
<br>
Unfortunately, when investigating this issue, I&#39;ve found a bug which, <=
br>
for now, prevents you from specifying margin-bottom=3D&quot;0cm&quot; twice=
.<br>
<br>
The workwaround is to specify a very small value, e.g. <br>
margin-bottom=3D&quot;0.05cm&quot;, like below (attached .fo file):<br>
---<br>
=C2=A0 =C2=A0&lt;fo:simple-page-master margin-left=3D&quot;2.499431cm&quot;=
 master-name=3D&quot;spm37&quot; <br>
page-height=3D&quot;29.7004cm&quot; margin-top=3D&quot;1.25cm&quot; margin-=
bottom=3D&quot;0.05cm&quot; <br>
page-width=3D&quot;21.0009cm&quot; margin-right=3D&quot;2.499431cm&quot;&gt=
;<br>
=C2=A0 =C2=A0 &lt;fo:region-body margin-top=3D&quot;1.25cm&quot; margin-bot=
tom=3D&quot;0.05cm&quot;/&gt;<br>
=C2=A0 =C2=A0 &lt;fo:region-after extent=3D&quot;2cm&quot; overflow=3D&quot=
;visible&quot; <br>
display-align=3D&quot;after&quot; precedence=3D&quot;true&quot;/&gt;<br>
=C2=A0 =C2=A0&lt;/fo:simple-page-master&gt;<br>
---<br>
<br>
This should give you the results very close to what you want. See <br>
attached screenshot.<br>
</blockquote></div>

--000000000000ccbe16061bc8de54--

--===============5925206706595353629==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

--===============5925206706595353629==--