fop - problem....

Discussion in 'XML' started by Hans Raber, Jan 25, 2004.

  1. Hans Raber

    Hans Raber Guest

    hi everyone!

    i have a problem with xsl/fop (within the cocoon environment,
    apache-fop is used for rendering the pdf):

    the target is a pdf looking like this:
    +---------------+
    | text1 |
    | height: 3cm |
    | |
    +---------------+
    | text2 |
    | height: 3cm |
    | |
    +---------------+

    i tried the following code:

    <fo:block-container height="3cm" width="5cm" background-color="blue">
    <fo:block>line 1</fo:block>
    </fo:block-container>

    <fo:block-container height="3cm" width="5cm" background-color="green">
    <fo:block>line 2</fo:block>
    </fo:block-container>


    the result has a width of 5cm, but is just as high as the font is.

    does anyone know how i can have a fixed height for elements?
    (the above example works when i add the position="absolute" attribute,
    however, i'd prefer relative positioning)

    regards,
    hans.
    Hans Raber, Jan 25, 2004
    #1
    1. Advertising

  2. Hans Raber wrote:
    > i tried the following code:
    >
    > <fo:block-container height="3cm" width="5cm" background-color="blue">
    > <fo:block>line 1</fo:block>
    > </fo:block-container>


    Have a look at <http://xml.apache.org/fop/compliance.html> for FOP's
    support for block-container.
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
    Johannes Koch, Jan 26, 2004
    #2
    1. Advertising

  3. Hans Raber

    Hans Raber Guest

    Johannes Koch <> wrote in message news:<bv2nt3$n8vda$-berlin.de>...

    > Have a look at <http://xml.apache.org/fop/compliance.html> for FOP's
    > support for block-container.


    thanks :)
    clears things up....

    for those who are interested:
    to achieve my target i now use a table (table-cell supports the height
    attribute and does not require absolute positioning)
    Hans Raber, Jan 26, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Natty Gur
    Replies:
    1
    Views:
    451
    =?Utf-8?B?cGxhbmRyeUBuZXdzZ3JvdXBzLm5vc3BhbQ==?=
    Jul 21, 2004
  2. =?Utf-8?B?cGxhbmRyeUBuZXdzZ3JvdXBzLm5vc3BhbQ==?=

    RE: Calling FOP (a java application) from ASP.NET

    =?Utf-8?B?cGxhbmRyeUBuZXdzZ3JvdXBzLm5vc3BhbQ==?=, Jul 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    395
    =?Utf-8?B?cGxhbmRyeUBuZXdzZ3JvdXBzLm5vc3BhbQ==?=
    Jul 21, 2004
  3. cv

    FOP font problem

    cv, Oct 8, 2003, in forum: XML
    Replies:
    1
    Views:
    575
    Johannes Koch
    Oct 9, 2003
  4. enerion
    Replies:
    0
    Views:
    529
    enerion
    Apr 13, 2004
  5. Pablo
    Replies:
    0
    Views:
    929
    Pablo
    Mar 28, 2007
Loading...

Share This Page