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 Andreas L Delmelle <a_...@pandora.be> on 2006/09/28 18:27:28 UTC

Re: FOP 1.0dev: exploiting of AreaTree for measurement of content

On Sep 28, 2006, at 10:04, Igor Istomin wrote:

> Hi,
>
> I started to use FOP 0.92beta (for prototyping of print subsystem) and
>
> I need to measure some content before producing of final XSL-FO  
> document.
>
> In fact, I need to determine height of page header/footer.
>
> Is it possible to use FOP's API (internal) to perform such  
> measurements ?

Possible? I think so, but it could turn out to be quite some work...

Maybe you could use the Intermediate Format (*) for this?
Render the area tree to XML, perform the computations/transform the  
attributes via XSLT, and finally render the altered area tree to PDF.


HTH!

Andreas

(*) see: http://xmlgraphics.apache.org/fop/0.92/intermediate.html

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


Re: FOP 1.0dev: exploiting of AreaTree for measurement of content

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Sep 29, 2006, at 09:56, Igor Istomin wrote:

Hi Igor,
> <snip />
>
> > Maybe you could use the Intermediate Format (*) for this?
>
> > Render the area tree to XML, perform the computations/transform the
>
> > attributes via XSLT, and finally render the altered area tree to  
> PDF.
>
> Thanks for this idea. I consider this solution as alternative. The  
> problem
>
> is that an input document can be huge and it seems not rational to  
> process
>
> the whole document to modify page header/footer only.

You could be right, but I just realized that I haven't asked more  
info about why precisely you need to modify the header/footer... It  
would probably help a lot if you could explain this a bit more.

Are you absolutely certain that your issue can't be solved purely in  
XSL-FO?
If yes, is it the same adjustment for all pages? Do you need the  
entire document contents to determine how much adjustment you need?  
Maybe it's possible to render only the first few pages (or the first  
page-sequence)?

Besides that, it does not necessarily mean processing the whole  
document twice, but rather, perform part of the processing, then dump  
the area tree to XML, modify that, and finally continue the process  
(?) At least you'll skip the layout-phase the second time around  
(unless you need to merge information from the area tree with the  
original FO).

Note the remark all the way at the bottom of the page about the  
Intermediate Format: you don't really need to write the XML to an  
output file.


Cheers,

Andreas



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