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 Rick Roen <Ri...@LakeValleySeed.com> on 2006/06/16 03:25:24 UTC
margins
FOP trunk
I'm confused by the page margins I am getting with the xslt below.
I would like to get 1cm margins on all sides with the footer taking 5mm and
the body above that by 5mm.
What I am getting when I render to a pdf is 1cm top, approx 1.5cm right and
left, and about 2.5cm bottom. The printer has a small margin, but it is an
ink-jet, so it is minimal.
Can someone tell me where I am going wrong?
Thanks,
Rick
<xsl:template match="salesdocument">
<fo:root font-family="sans-serif" font-size="8pt"
font-weight="normal">
<fo:layout-master-set>
<fo:simple-page-master
master-name="main" page-height="11in" page-width="8.5in" margin="1cm 1cm 1cm
1cm">
<fo:region-body
margin-bottom="1cm" />
<fo:region-after
extent=".5cm" region-name="footer"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence
master-reference="main">
<xsl:call-template
name="footer"/>
<fo:flow
flow-name="xsl-region-body" font-family="sans-serif" font-size="8pt"
font-weight="normal" >
<xsl:apply-templates />
<!-- last thing
in document so the total pages can be calculated for the footer "page x of
y" -->
<fo:block
id="endofdoc" margin="0cm" height="0cm"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
RE: margins
Posted by Rick Roen <Ri...@LakeValleySeed.com>.
Indeed, that was the problem. Thank you Andreas!
I use "Page scaling - None" and I get margins that correlate with my FO.
Rick
-----Original Message-----
From: Andreas L Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: Friday, June 16, 2006 3:10 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: margins
Nothing really, AFAICT. Before we start looking any further, can you
do us a favor and check the settings when printing the PDF? Could be
that Adobe Reader is performing stretching/shrinking. If there is a
shrink to printable-page-width going on, that could explain a few
things... 1cm right/left shrinks to 'approx. 1cm', plus the 0.5cm
printer-margin.
HTH!
Andreas
---------------------------------------------------------------------
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: margins
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jun 16, 2006, at 03:25, Rick Roen wrote:
Hi,
> FOP trunk
>
> I’m confused by the page margins I am getting with the xslt below.
>
> I would like to get 1cm margins on all sides with the footer taking
> 5mm and the body above that by 5mm.
>
> What I am getting when I render to a pdf is 1cm top, approx 1.5cm
> right and left, and about 2.5cm bottom. The printer has a small
> margin, but it is an ink-jet, so it is minimal.
... about 0.5cm sounds minimal enough to me, for a decent inkjet ;)
> Can someone tell me where I am going wrong?
Nothing really, AFAICT. Before we start looking any further, can you
do us a favor and check the settings when printing the PDF? Could be
that Adobe Reader is performing stretching/shrinking. If there is a
shrink to printable-page-width going on, that could explain a few
things... 1cm right/left shrinks to 'approx. 1cm', plus the 0.5cm
printer-margin.
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org