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

Re: dynamic fo:table-column width?

Subject: Re: dynamic fo:table-column width?
From: Luke Jones <ljones@xxxxxxxxxx>
Date: Wed, 30 May 2007 09:51:39 -0500
Re:  dynamic fo:table-column width?
On Wed, 2007-05-30 at 09:41 -0500, Eliot Kimber wrote:
> One way to do it might be to wrap the content of the column you want to 
> be dynamic within fo:inline with a keep-together.within-line="always". 
> This should disallow breaking of the line. By then using automatic table 
> layout, you should get what you want, at least for that line.
> 
> Another solution is to create an XSLT extension function that can 
> estimate the rendered length of the content and then use that estimate 
> to set the column width. I've done this in Java using the standard Java 
> graphics API. It requires that you know the current font and font size 
> (which presumably you can know if you're generating the output), but the 
> programming was relatively easy, if memory serves (I don't have the code 
> to hand).
> 
> Otherwise there is direct way to do what you want.

Thanks for the input.  Unfortunately I'm using fop to render the pdf and
the auto table-layout isn't currently supported.  I'll give the
extension function a go.  If any other ideas pop up, please let me
know! 

Thanks,
Luke

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.