On Tuesday 23 May 2006 20:10, Stanimir Markov wrote: > Hi, > > On a project I'm working, we need a replacement for the coldfusion's > <cfdocument> tag that is used to generate pdf files from an html > content. We're using this to produce a pdf version of reports that > are generated on the fly. > > The problem is that cfdocument has a lot of annoying bugs, and we're > looking to switch to other technologie. After some fighting with > tidy-css2xslfo-fop 0.92, I was able to produce an report from a > html+css converted to xhtml+css (tidy). Then css2xslfo is used to > produce the xsl-fo file and finally fop is used to render the pdf. > > The problem is that the columns are too wide, and only the first two > columns are printed and the rest are lost (the report is really wide > with 15+ columns). I'm asking here : > > Is FOP capable to scale (automagically) the input so that it fits the > output page width? I know the text becomes almost unreadable, but we > need this. > When you talk about columns I assume you mean table columns?
ATM FOP cannot automatically size table columns based on the content. You must specify a column width for each column. However, the column width does not have to be absolute. You can use the proportional-column-width() function to specify a relative width (similar but not quite the same as specifying percentages). As I don't know the input html, css and the xsl you use it is hard to say if it will work in your case. In the end it boils down to having <col width="10%" /> tags in your input (x)html and to translate them in the chain to <fo:table-column width="proportional-column-width(10)" /> elements. May be I misunderstand and what you want is automatic font scaling. No, FOP can't do that. It will use the font-size as specificed in the input .fo file. Manuel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]