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 <<a href=3D"mailto:[email protected]">hussei= [email protected]</a>>:<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> > I'd like to get my footer as close as=C2=A0possible to the lower b= ound of the <br> > page. Therefore=C2=A0I set the margin-bottom to 0. But it doesn't = work. In my <br> > rendered RTF-Result the distance between my footer row and the lower <= br> > bound is round about 1.5cm.<br> > If I render it with apache fop to PDF, all is fine.<br> > <br> > <fo:layout-master-set><br> >=C2=A0 =C2=A0 <fo:simple-page-master margin-left=3D"2.499431cm&= quot; master-name=3D"spm37" <br> > page-height=3D"29.7004cm" margin-top=3D"1.25cm" *m= argin-bottom=3D"0cm*"=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0page-width=3D"21.0009cm" margin-right=3D"2.= 499431cm"><br> >=C2=A0 =C2=A0 =C2=A0 <fo:region-body margin-top=3D"1.25cm"= margin-bottom=3D"2cm"/><br> >=C2=A0 =C2=A0 =C2=A0 <fo:region-after extent=3D"2cm" overf= low=3D"visible" <br> > display-align=3D"after" precedence=3D"true"/><b= r> >=C2=A0 =C2=A0 </fo:simple-page-master><br> > </fo:layout-master-set><br> > <br> > <fo:page-sequence master-reference=3D"spm37" language=3D&= quot;de" hyphenate=3D"false"><br> >=C2=A0 =C2=A0 <fo:static-content flow-name=3D"xsl-region-after&= quot;><br> >=C2=A0 =C2=A0 =C2=A0<fo:block font-size=3D"11pt" language= =3D"de" line-height=3D"12.65pt" <br> > font-family=3D"Calibri" orphans=3D"2" widows=3D&qu= ot;2">That is my footer</fo:block><br> > </fo:static-content><br> > ...<br> > <br> > How can I fix this problem?<br> > <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<fo:simple-page-master margin-left=3D"2.499431cm"= master-name=3D"spm37" <br> page-height=3D"29.7004cm" margin-top=3D"1.25cm" margin-= bottom=3D"0cm" <br> page-width=3D"21.0009cm" margin-right=3D"2.499431cm">= ;<br> =C2=A0 =C2=A0 <fo:region-body margin-top=3D"1.25cm" margin-bot= tom=3D"0cm"/><br> =C2=A0 =C2=A0 <fo:region-after extent=3D"2cm" overflow=3D"= ;visible" <br> display-align=3D"after" precedence=3D"true"/><br> =C2=A0 =C2=A0</fo:simple-page-master><br> ---<br> <br> Unfortunately, when investigating this issue, I've found a bug which, <= br> for now, prevents you from specifying margin-bottom=3D"0cm" twice= .<br> <br> The workwaround is to specify a very small value, e.g. <br> margin-bottom=3D"0.05cm", like below (attached .fo file):<br> ---<br> =C2=A0 =C2=A0<fo:simple-page-master margin-left=3D"2.499431cm"= master-name=3D"spm37" <br> page-height=3D"29.7004cm" margin-top=3D"1.25cm" margin-= bottom=3D"0.05cm" <br> page-width=3D"21.0009cm" margin-right=3D"2.499431cm">= ;<br> =C2=A0 =C2=A0 <fo:region-body margin-top=3D"1.25cm" margin-bot= tom=3D"0.05cm"/><br> =C2=A0 =C2=A0 <fo:region-after extent=3D"2cm" overflow=3D"= ;visible" <br> display-align=3D"after" precedence=3D"true"/><br> =C2=A0 =C2=A0</fo:simple-page-master><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==--