[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: evaluate rendered text lenght

Subject: Re: evaluate rendered text lenght
From: Brandon Ibach <brandon.ibach@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 May 2011 11:59:03 -0400
Re:  evaluate rendered text lenght
My approach to cases where I seem to need the rendered dimension of
something has generally been to set up a two-pass system.  I generate
an XML area tree from the formatter (FOP or otherwise) on the first
pass, read the necessary information from that and incorporate it in a
second pass.  The second pass could either modify the area tree and
then format it directly or regenerate the FO from source,
incorporating the extra information in the process.

All that said, FO does have at least a few tricks up its sleeve that
may allow you to side-step the apparent need for the rendered length.
Can you tell us about the use case that's driving your requirement for
the rendered length?  Maybe we can suggest a way around it.

-Brandon :)


On Tue, May 24, 2011 at 6:05 AM, Giuseppe Briotti <g.briotti@xxxxxxxxx>
wrote:
> Hi all, I would like to evalutate the lenght of a string as it will be
> rendered in FOP. Of course, because of FOP formatting strategy, this
> info can be just an approximation, but for my purpouse can be enough.
>
> I've seen the Eliot Kimber extension (Function "renderedTextLength")
> but it is no longer available on Innodata Isogen web site. There are
> other alternatives?
>
> TIA
>
> Giuseppe Briotti

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.