Ah, I see. You can do that in a two-step approach: First render the document to the area tree XML (-at on the command-line, embedded: MimeConstants.MIME_FOP_AREA_TREE) and inspect the following value: /areaTree/pageSequence/pageViewport/page/regionViewport/regionBody/mainReference/span/@bpda
That tells you how high all the content in the flow is (in millipoints), provided you use a page-height that is more than large enough not to make FOP break to a new page. Then, render the document a second time using the PNG renderer, using the right height (based on the value above). In theory, there's an easier mechanism, using page-height="indefinite" but that's not implemented, yet. On 29.05.2007 14:50:54 fma-001 wrote: > > Hi Jeremias! > > This way I have already tried out. But the thing is that the png has a too > big white area (the space needed for the sample text might just be 300px in > width and 12px in height)! And when the text is bigger and overflows the > height of 208px FOP creates another png. But I would like to have just _one_ > png with _exactly_ the height it needs (for your text maybe just 12px) ! > > Maybe this image makes my problem clearer: > http://www.nabble.com/file/p10853518/data_bak.png > > As I mentioned, I generate a table. So my work-around was to count the rows > and multiply with the font-size; but the problem is that there might be rows > with multiple lines. > > What I am searching for is a method or attribute to get the printed height > (height of the table). Any ideas? > > Thanks in advance! > Best regards, Franz > -- > View this message in context: > http://www.nabble.com/FOP0.93%3A-png-output-in-optimized-height-tf3788704.html#a10853518 > Sent from the FOP - Users mailing list archive at Nabble.com. Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
