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 Stuart Scott <St...@countrywide.co.uk> on 2010/02/12 12:10:53 UTC

Flowing absolute positioned block-containers

The following code (which has been cut down to use as an example) uses
two circles onto a block container to create the illusion of a table
with space between the two circles (see attached):
 
  <fo:block-container absolute-position="absolute" left="0.8cm"
top="1cm" width="17cm" height="1.3cm" background-color="red">  
   <fo:block font-family="Helvetica" font-size="6">&#160;</fo:block>

  </fo:block-container>
  <fo:block-container absolute-position="absolute" left="0.2cm"
top="0.56cm">  
   <fo:block font-family="Helvetica" font-size="11" font-weight="bold"
color="#0A3548">
    <fo:instream-foreign-object content-height="5.2em"> 
        <svg:svg xmlns:svg="http://www.w3.org/2000/svg" height="500"
width="500" viewBox="-50 -50 100 100">
         <svg:circle r="50" style="fill:white; stroke:none"/>
        </svg:svg> 
       </fo:instream-foreign-object>
      </fo:block>     
  </fo:block-container>
  <fo:block-container absolute-position="absolute" left="0.2cm"
top="0.6cm">  
   <fo:block font-family="Helvetica" font-size="11" font-weight="bold"
color="#0A3548">
   <fo:instream-foreign-object content-height="5em"> 
      <svg:svg xmlns:svg="http://www.w3.org/2000/svg" height="500"
width="500" viewBox="-50 -50 100 100">
       <svg:circle r="50" style="fill:red; stroke:none"/>
      </svg:svg> 
     </fo:instream-foreign-object>
    </fo:block>     
   </fo:block-container>
 
This relies heavily on positioning within the parent.  However, I need
this to move depending on other content down the page and possibly onto
the next page as necessary.  I have tried placing this within a table
but it obviously does not move as the position is absolute.  I have
tried 
 
Can anyone tell me if this is the best way of achieving this and indeed
if this is possible?
 
I am currently using FOP 0.93 and can't upgrade at this time.
 
Kind regards
 
Stuart Scott
For email disclaimer details please click or visit - http://www.countrywideplc.co.uk/disclaimer