xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Ringer <cr...@postnewspapers.com.au>
Subject Re: AW: Identifying absolute position of a FO:Block
Date Tue, 05 Oct 2010 00:34:42 GMT
On 4/10/2010 11:28 PM, mithunk wrote:
> Thanks Georg,
> I am new to FOP. Can you please help me with how to calculate the position
> by giving a block id.
> I modified my XSL with a block id (for a field), now dont know how to
> calculate the position.


Use fop to produce the intermediate "area tree" output from your XSL-FO. 
See the documentation for details on that.

Once you have the area tree, use xpath to find the block. IIRC the id 
will be in the 'prod-id' attribute of the block(s) generated. If it's 
broken across a page, column, etc there may be more than one element 

Once you've found the element(s) you should be able to work out the 
position from the positioning attributes them and their parent elements.

It's possible that the new intermediate format ("IF") is better than the 
area tree for this, but I haven't worked with it much so all I can 
suggest is generating it, looking at it, and seeing if it's useful. I 
have the feeling the new IF doesn't include element IDs, but I may be 

Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message