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 Andy Bowes <ab...@clara.co.uk> on 2002/04/15 12:13:15 UTC

newbie - Minimum Block Heights

Hi

I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:

<block min-height="2cm">Block Contents</block>

However I get the following warning when I attempt to transform this into a PDF:

"WARNING: property 'min-height' ignored"

What am I doing wrong here ?

Thanks

Andy

Re: newbie - Minimum Block Heights

Posted by Guillaume Patin <gp...@cofidis.fr>.
I've found your solution :

try the line-height attribute :

<fo:block line-height="15cm" background-color="silver">This is the block contents</fo:block>

it does work on fop 0.20.3

you can find a reference of the fo specification at 
http://www.zvon.org/xxl/xslfoReference/Output/index.html


----- Original Message ----- 
  From: Andy Bowes 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 3:24 PM
  Subject: Re: newbie - Minimum Block Heights


  Yeah,
   
  The height attribute works on an <fo:table> but not on a block.  Is that a bug ?
   
  Andy
   
    ----- Original Message ----- 
    From: Guillaume Patin 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 2:26 PM
    Subject: Re: newbie - Minimum Block Heights


    did you try to create a table with the specified height ?
      ----- Original Message ----- 
      From: Andy Bowes 
      To: fop-user@xml.apache.org 
      Sent: Monday, April 15, 2002 3:14 PM
      Subject: Re: newbie - Minimum Block Heights


      Hi,
       
      Thanks for confirming that I am not going mad. :)
       
      Unfortunately the padding at the bottom will not really achieve the result I am after.  I want to allow the block to grow with it's content but ensure that it is AT LEAST a certain size.
       
      It look like I will have to use a table with a 'hidden' block which uses the padding that you have specified.  It's a bit of a nasty fix.
       
      Surely someone else must have come across this before.
       
      Andy
       
       
        ----- Original Message ----- 
        From: Guillaume Patin 
        To: fop-user@xml.apache.org 
        Sent: Monday, April 15, 2002 1:58 PM
        Subject: Re: newbie - Minimum Block Heights


        You're right !!
         
        I've tried with the padding-bottom attribute, and it does work, but it may not fit your needs...
         
        just try this :
         <fo:block padding-bottom="15cm" background-color="silver">
         
        friendly,
        Guillaume
          ----- Original Message ----- 
          From: Andy Bowes 
          To: fop-user@xml.apache.org 
          Sent: Monday, April 15, 2002 2:26 PM
          Subject: Re: newbie - Minimum Block Heights


          Hi Guillaume
           
          I have tried using just the height attribute in the block e.g.
           
          <?xml version="1.0"?>
          <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
           <fo:layout-master-set>
            <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
             <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
             <fo:region-before extent="1.5cm"/>
             <fo:region-after extent="2cm"/>
            </fo:simple-page-master>
           </fo:layout-master-set>
           <fo:page-sequence master-name="A4" initial-page-number="1">
            <fo:static-content flow-name="xsl-region-before">
            </fo:static-content>
            <fo:static-content flow-name="xsl-region-after">
            </fo:static-content>
            <fo:flow flow-name="xsl-region-body">
             <fo:block>Before Block</fo:block>
             <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
             <fo:block>After Block</fo:block>
             <fo:block id="end-of-doc"/>
            </fo:flow>
           </fo:page-sequence>
          </fo:root>

          I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

          I am sure that I must be doing something obvoiusly wrong but I can't see it.

          p.s. I am using FOP 0.18.1

          Any pointers will be very useful.

          Thanks Andy



            ----- Original Message ----- 
            From: Guillaume Patin 
            To: fop-user@xml.apache.org 
            Sent: Monday, April 15, 2002 11:26 AM
            Subject: Re: newbie - Minimum Block Heights


            why don't you simply specify the 'height' attribute  ? 
              ----- Original Message ----- 
              From: Andy Bowes 
              To: fop-user@xml.apache.org 
              Sent: Monday, April 15, 2002 12:13 PM
              Subject: newbie - Minimum Block Heights


              Hi
               
              I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:
               
              <block min-height="2cm">Block Contents</block>
               
              However I get the following warning when I attempt to transform this into a PDF:
               
              "WARNING: property 'min-height' ignored"
               
              What am I doing wrong here ?
               
              Thanks
               
              Andy

Re: newbie - Minimum Block Heights

Posted by Andy Bowes <ab...@clara.co.uk>.
Yeah,

The height attribute works on an <fo:table> but not on a block.  Is that a bug ?

Andy

  ----- Original Message ----- 
  From: Guillaume Patin 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 2:26 PM
  Subject: Re: newbie - Minimum Block Heights


  did you try to create a table with the specified height ?
    ----- Original Message ----- 
    From: Andy Bowes 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 3:14 PM
    Subject: Re: newbie - Minimum Block Heights


    Hi,

    Thanks for confirming that I am not going mad. :)

    Unfortunately the padding at the bottom will not really achieve the result I am after.  I want to allow the block to grow with it's content but ensure that it is AT LEAST a certain size.

    It look like I will have to use a table with a 'hidden' block which uses the padding that you have specified.  It's a bit of a nasty fix.

    Surely someone else must have come across this before.

    Andy


      ----- Original Message ----- 
      From: Guillaume Patin 
      To: fop-user@xml.apache.org 
      Sent: Monday, April 15, 2002 1:58 PM
      Subject: Re: newbie - Minimum Block Heights


      You're right !!

      I've tried with the padding-bottom attribute, and it does work, but it may not fit your needs...

      just try this :
       <fo:block padding-bottom="15cm" background-color="silver">

      friendly,
      Guillaume
        ----- Original Message ----- 
        From: Andy Bowes 
        To: fop-user@xml.apache.org 
        Sent: Monday, April 15, 2002 2:26 PM
        Subject: Re: newbie - Minimum Block Heights


        Hi Guillaume

        I have tried using just the height attribute in the block e.g.

        <?xml version="1.0"?>
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <fo:layout-master-set>
          <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
           <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
           <fo:region-before extent="1.5cm"/>
           <fo:region-after extent="2cm"/>
          </fo:simple-page-master>
         </fo:layout-master-set>
         <fo:page-sequence master-name="A4" initial-page-number="1">
          <fo:static-content flow-name="xsl-region-before">
          </fo:static-content>
          <fo:static-content flow-name="xsl-region-after">
          </fo:static-content>
          <fo:flow flow-name="xsl-region-body">
           <fo:block>Before Block</fo:block>
           <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
           <fo:block>After Block</fo:block>
           <fo:block id="end-of-doc"/>
          </fo:flow>
         </fo:page-sequence>
        </fo:root>

        I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

        I am sure that I must be doing something obvoiusly wrong but I can't see it.

        p.s. I am using FOP 0.18.1

        Any pointers will be very useful.

        Thanks Andy



          ----- Original Message ----- 
          From: Guillaume Patin 
          To: fop-user@xml.apache.org 
          Sent: Monday, April 15, 2002 11:26 AM
          Subject: Re: newbie - Minimum Block Heights


          why don't you simply specify the 'height' attribute  ? 
            ----- Original Message ----- 
            From: Andy Bowes 
            To: fop-user@xml.apache.org 
            Sent: Monday, April 15, 2002 12:13 PM
            Subject: newbie - Minimum Block Heights


            Hi

            I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:

            <block min-height="2cm">Block Contents</block>

            However I get the following warning when I attempt to transform this into a PDF:

            "WARNING: property 'min-height' ignored"

            What am I doing wrong here ?

            Thanks

            Andy

Re: newbie - Minimum Block Heights

Posted by Guillaume Patin <gp...@cofidis.fr>.
did you try to create a table with the specified height ?
  ----- Original Message ----- 
  From: Andy Bowes 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 3:14 PM
  Subject: Re: newbie - Minimum Block Heights


  Hi,
   
  Thanks for confirming that I am not going mad. :)
   
  Unfortunately the padding at the bottom will not really achieve the result I am after.  I want to allow the block to grow with it's content but ensure that it is AT LEAST a certain size.
   
  It look like I will have to use a table with a 'hidden' block which uses the padding that you have specified.  It's a bit of a nasty fix.
   
  Surely someone else must have come across this before.
   
  Andy
   
   
    ----- Original Message ----- 
    From: Guillaume Patin 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 1:58 PM
    Subject: Re: newbie - Minimum Block Heights


    You're right !!
     
    I've tried with the padding-bottom attribute, and it does work, but it may not fit your needs...
     
    just try this :
     <fo:block padding-bottom="15cm" background-color="silver">
     
    friendly,
    Guillaume
      ----- Original Message ----- 
      From: Andy Bowes 
      To: fop-user@xml.apache.org 
      Sent: Monday, April 15, 2002 2:26 PM
      Subject: Re: newbie - Minimum Block Heights


      Hi Guillaume
       
      I have tried using just the height attribute in the block e.g.
       
      <?xml version="1.0"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <fo:layout-master-set>
        <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
         <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
         <fo:region-before extent="1.5cm"/>
         <fo:region-after extent="2cm"/>
        </fo:simple-page-master>
       </fo:layout-master-set>
       <fo:page-sequence master-name="A4" initial-page-number="1">
        <fo:static-content flow-name="xsl-region-before">
        </fo:static-content>
        <fo:static-content flow-name="xsl-region-after">
        </fo:static-content>
        <fo:flow flow-name="xsl-region-body">
         <fo:block>Before Block</fo:block>
         <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
         <fo:block>After Block</fo:block>
         <fo:block id="end-of-doc"/>
        </fo:flow>
       </fo:page-sequence>
      </fo:root>

      I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

      I am sure that I must be doing something obvoiusly wrong but I can't see it.

      p.s. I am using FOP 0.18.1

      Any pointers will be very useful.

      Thanks Andy



        ----- Original Message ----- 
        From: Guillaume Patin 
        To: fop-user@xml.apache.org 
        Sent: Monday, April 15, 2002 11:26 AM
        Subject: Re: newbie - Minimum Block Heights


        why don't you simply specify the 'height' attribute  ? 
          ----- Original Message ----- 
          From: Andy Bowes 
          To: fop-user@xml.apache.org 
          Sent: Monday, April 15, 2002 12:13 PM
          Subject: newbie - Minimum Block Heights


          Hi
           
          I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:
           
          <block min-height="2cm">Block Contents</block>
           
          However I get the following warning when I attempt to transform this into a PDF:
           
          "WARNING: property 'min-height' ignored"
           
          What am I doing wrong here ?
           
          Thanks
           
          Andy

Re: newbie - Minimum Block Heights

Posted by Andy Bowes <ab...@clara.co.uk>.
Hi,

Thanks for confirming that I am not going mad. :)

Unfortunately the padding at the bottom will not really achieve the result I am after.  I want to allow the block to grow with it's content but ensure that it is AT LEAST a certain size.

It look like I will have to use a table with a 'hidden' block which uses the padding that you have specified.  It's a bit of a nasty fix.

Surely someone else must have come across this before.

Andy


  ----- Original Message ----- 
  From: Guillaume Patin 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 1:58 PM
  Subject: Re: newbie - Minimum Block Heights


  You're right !!

  I've tried with the padding-bottom attribute, and it does work, but it may not fit your needs...

  just try this :
   <fo:block padding-bottom="15cm" background-color="silver">

  friendly,
  Guillaume
    ----- Original Message ----- 
    From: Andy Bowes 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 2:26 PM
    Subject: Re: newbie - Minimum Block Heights


    Hi Guillaume

    I have tried using just the height attribute in the block e.g.

    <?xml version="1.0"?>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
     <fo:layout-master-set>
      <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
       <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
       <fo:region-before extent="1.5cm"/>
       <fo:region-after extent="2cm"/>
      </fo:simple-page-master>
     </fo:layout-master-set>
     <fo:page-sequence master-name="A4" initial-page-number="1">
      <fo:static-content flow-name="xsl-region-before">
      </fo:static-content>
      <fo:static-content flow-name="xsl-region-after">
      </fo:static-content>
      <fo:flow flow-name="xsl-region-body">
       <fo:block>Before Block</fo:block>
       <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
       <fo:block>After Block</fo:block>
       <fo:block id="end-of-doc"/>
      </fo:flow>
     </fo:page-sequence>
    </fo:root>

    I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

    I am sure that I must be doing something obvoiusly wrong but I can't see it.

    p.s. I am using FOP 0.18.1

    Any pointers will be very useful.

    Thanks Andy



      ----- Original Message ----- 
      From: Guillaume Patin 
      To: fop-user@xml.apache.org 
      Sent: Monday, April 15, 2002 11:26 AM
      Subject: Re: newbie - Minimum Block Heights


      why don't you simply specify the 'height' attribute  ? 
        ----- Original Message ----- 
        From: Andy Bowes 
        To: fop-user@xml.apache.org 
        Sent: Monday, April 15, 2002 12:13 PM
        Subject: newbie - Minimum Block Heights


        Hi

        I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:

        <block min-height="2cm">Block Contents</block>

        However I get the following warning when I attempt to transform this into a PDF:

        "WARNING: property 'min-height' ignored"

        What am I doing wrong here ?

        Thanks

        Andy

Re: newbie - Minimum Block Heights

Posted by Guillaume Patin <gp...@cofidis.fr>.
You're right !!

I've tried with the padding-bottom attribute, and it does work, but it may not fit your needs...

just try this :
 <fo:block padding-bottom="15cm" background-color="silver">

friendly,
Guillaume
  ----- Original Message ----- 
  From: Andy Bowes 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 2:26 PM
  Subject: Re: newbie - Minimum Block Heights


  Hi Guillaume
   
  I have tried using just the height attribute in the block e.g.
   
  <?xml version="1.0"?>
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
    <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
     <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
     <fo:region-before extent="1.5cm"/>
     <fo:region-after extent="2cm"/>
    </fo:simple-page-master>
   </fo:layout-master-set>
   <fo:page-sequence master-name="A4" initial-page-number="1">
    <fo:static-content flow-name="xsl-region-before">
    </fo:static-content>
    <fo:static-content flow-name="xsl-region-after">
    </fo:static-content>
    <fo:flow flow-name="xsl-region-body">
     <fo:block>Before Block</fo:block>
     <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
     <fo:block>After Block</fo:block>
     <fo:block id="end-of-doc"/>
    </fo:flow>
   </fo:page-sequence>
  </fo:root>

  I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

  I am sure that I must be doing something obvoiusly wrong but I can't see it.

  p.s. I am using FOP 0.18.1

  Any pointers will be very useful.

  Thanks Andy



    ----- Original Message ----- 
    From: Guillaume Patin 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 11:26 AM
    Subject: Re: newbie - Minimum Block Heights


    why don't you simply specify the 'height' attribute  ? 
      ----- Original Message ----- 
      From: Andy Bowes 
      To: fop-user@xml.apache.org 
      Sent: Monday, April 15, 2002 12:13 PM
      Subject: newbie - Minimum Block Heights


      Hi
       
      I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:
       
      <block min-height="2cm">Block Contents</block>
       
      However I get the following warning when I attempt to transform this into a PDF:
       
      "WARNING: property 'min-height' ignored"
       
      What am I doing wrong here ?
       
      Thanks
       
      Andy

Re: newbie - Minimum Block Heights

Posted by Andy Bowes <ab...@clara.co.uk>.
Hi Guillaume

I have tried using just the height attribute in the block e.g.

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
 <fo:layout-master-set>
  <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="2cm" margin-right="2cm">
   <fo:region-body margin-top="1.5cm" margin-bottom="2cm"/>
   <fo:region-before extent="1.5cm"/>
   <fo:region-after extent="2cm"/>
  </fo:simple-page-master>
 </fo:layout-master-set>
 <fo:page-sequence master-name="A4" initial-page-number="1">
  <fo:static-content flow-name="xsl-region-before">
  </fo:static-content>
  <fo:static-content flow-name="xsl-region-after">
  </fo:static-content>
  <fo:flow flow-name="xsl-region-body">
   <fo:block>Before Block</fo:block>
   <fo:block height="15cm" background-color="silver">This is the block contents</fo:block>
   <fo:block>After Block</fo:block>
   <fo:block id="end-of-doc"/>
  </fo:flow>
 </fo:page-sequence>
</fo:root>

I would expect to see a pretty large middle block with a grey background but this central block just fits around the enclosed text.  (See attached PDF file)

I am sure that I must be doing something obvoiusly wrong but I can't see it.

p.s. I am using FOP 0.18.1

Any pointers will be very useful.

Thanks Andy



  ----- Original Message ----- 
  From: Guillaume Patin 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 11:26 AM
  Subject: Re: newbie - Minimum Block Heights


  why don't you simply specify the 'height' attribute  ? 
    ----- Original Message ----- 
    From: Andy Bowes 
    To: fop-user@xml.apache.org 
    Sent: Monday, April 15, 2002 12:13 PM
    Subject: newbie - Minimum Block Heights


    Hi

    I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:

    <block min-height="2cm">Block Contents</block>

    However I get the following warning when I attempt to transform this into a PDF:

    "WARNING: property 'min-height' ignored"

    What am I doing wrong here ?

    Thanks

    Andy

Re: newbie - Minimum Block Heights

Posted by Guillaume Patin <gp...@cofidis.fr>.
why don't you simply specify the 'height' attribute  ? 
  ----- Original Message ----- 
  From: Andy Bowes 
  To: fop-user@xml.apache.org 
  Sent: Monday, April 15, 2002 12:13 PM
  Subject: newbie - Minimum Block Heights


  Hi
   
  I am new to FOP and have hit a stumbling block pretty quickly.  I need to be able to set the minimum heigh of a block in the docuement and from the documentation though that this could be acheived using the following entries in the FO file:
   
  <block min-height="2cm">Block Contents</block>
   
  However I get the following warning when I attempt to transform this into a PDF:
   
  "WARNING: property 'min-height' ignored"
   
  What am I doing wrong here ?
   
  Thanks
   
  Andy