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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format