fop - problem....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hans Raber

    #1

    fop - problem....

    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>lin e 1</fo:block>
    </fo:block-container>

    <fo:block-container height="3cm" width="5cm" background-color="green">
    <fo:block>lin e 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="absol ute" attribute,
    however, i'd prefer relative positioning)

    regards,
    hans.
  • Johannes Koch

    #2
    Re: fop - problem....

    Hans Raber wrote:[color=blue]
    > i tried the following code:
    >
    > <fo:block-container height="3cm" width="5cm" background-color="blue">
    > <fo:block>lin e 1</fo:block>
    > </fo:block-container>[/color]

    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.)

    Comment

    • Hans Raber

      #3
      Re: fop - problem....

      Johannes Koch <koch@w3develop ment.de> wrote in message news:<bv2nt3$n8 vda$1@ID-61067.news.uni-berlin.de>...
      [color=blue]
      > Have a look at <http://xml.apache.org/fop/compliance.html > for FOP's
      > support for block-container.[/color]

      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)

      Comment

      Working...