Loading ...
Sorry, an error occurred while loading the content.

First page contents are widely spaced out

Expand Messages
  • Prashant Gupta
    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
    Message 1 of 2 , Nov 23, 2004
    • 0 Attachment
      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
    • Greg Gaffney
      I would take a wild guess that you have a large font or a large image in each row on the first page. Or you are setting the line-height larger on the first
      Message 2 of 2 , Nov 24, 2004
      • 0 Attachment
        I would take a wild guess that you have a large font or a large image in
        each row
        on the first page. Or you are setting the line-height larger on the first
        page.
        It's kind of hard to tell without a .fo sample. Partial stylesheets are hard
        to decipher.

        Cheers,
        Greg

        -----Original Message-----
        From: Prashant Gupta [mailto:pkumar@...]
        Sent: Tuesday, November 23, 2004 6:39 AM
        To: XSL-FO@yahoogroups.com
        Subject: [XSL-FO] 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?
      Your message has been successfully submitted and would be delivered to recipients shortly.