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 Prashant Gupta <pk...@apar.com> on 2004/11/29 07:49:14 UTC
First page contents are widely spaced out
Hello Everybody,
I am generating PDF using FOP. The pages contain a set of invoices. Each
invoice data is placed
In a table. My problem is that in the first page there is too much space
between the data rows(in the table) .
But , in rest of the pages the data is properly spaced.
I can't understand how this is happening?
Can anyone please help to crack this issue?
Below is the code snippet :
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions">
<!-- defines page layout -->
<fo:layout-master-set>
<!-- layout for the first page -->
<!--
<fo:simple-page-master master-name="Invoice" page-height="29.7cm"
page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="1cm"
margin-right="1cm">
<fo:region-body margin-top="1.5cm" />
<fo:region-before extent="1.5cm" />
<fo:region-after extent="1.5cm" />
</fo:simple-page-master>
-->
<fo:simple-page-master master-name="InvoiceImage"
page-height="29.7cm"
page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="1.5cm"
margin-right="1.5cm">
<fo:region-body margin-top="1.5cm" />
<fo:region-before extent="1.5cm" />
<fo:region-after extent="1.5cm" />
</fo:simple-page-master>
<fo:page-sequence-master master-name="InvoicePackaging">
<!--
<fo:single-page-master-reference master-reference="Invoice" />
-->
<fo:single-page-master-reference master-reference="InvoiceImage"
/>
</fo:page-sequence-master>
</fo:layout-master-set>
<xsl:apply-templates select="invoice"/>
........
....
<xsl:template match="invoice">
<fo:page-sequence master-reference="InvoicePackaging">
<fo:flow flow-name="xsl-region-body">
<fo:block-container height="44cm" width="18cm"
top="0cm" left="0cm" position="absolute">
<xsl:apply-templates select="core" />
.....
......
<xsl:template match="core">
<fo:table table-layout="fixed" space-after.optimum="6pt"
border-collapse="separate">
<fo:table-column column-width="100mm" />
<fo:table-column column-width="80mm" />
<fo:table-column column-width="40mm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell background-color="lightgrey">
<fo:block font-weight="bold">
Thanks in advance to everyone for the help.
--Prashant
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: First page contents are widely spaced out
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Prashant Gupta wrote:
> I am generating PDF using FOP. The pages contain a set of invoices. Each
> invoice data is placed
> In a table. My problem is that in the first page there is too much space
> between the data rows(in the table) .
> But , in rest of the pages the data is properly spaced.
There's not much to guess from an incomplete *stylesheet*. I
suspect you get whitespace drawn in from the XML source. Produce
and post a small FO file for more accurate help.
Your first page contains an absolutely placed block-container,
this may also be part of the problem.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org