One way that FOP could help in situations like this, without hacking or extending the XSL-FO Spec, might be to allow registration of event callback handlers for specific events with the Driver. The idea, at least in this case, would be to register a PaginationHandler that would be called whenever FOP determined that a new page was necessary. In this users case he could abort the current Formatting process, decrement some point size parameter and try again until he got a document without an intervening PaginationHandler event. This type of event based processing could probably be useful in many other contexts, but seems well suited for this one. (*Chris*)
-----Original Message----- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 7:55 am To: [EMAIL PROTECTED] Subject: Re: Fit data into a PDF page Chris Bowditch wrote: > I think what you are asking for is something like scale-to-fit? There is > no such feature in XSL-FO I'm afraid. The only way to achieve this > effect would be to change your font size/spacing depending on how much > data is in the report. Exactly how to do this will depend on the details > of your reports. Some experimentation will be required, and I should > warn you that such a solution will not be particularly robust, i.e. > report will be unreadable if you try to squeeze 6 pages worth into 1 page. > > Chris To echo what Chris says, the solution you will find will probably not be very desirable. You could also (perhaps) try post-processing with iText, although I'm not certain how it would work. I was going to suggest one other possibility: calculate dynamically sized region-before/region-body/region-after margins & extents. This would enable you to make the 'HEADER' and/or 'FOOTER' portions 'shrink-to-fit' depending upon the amount of content. However, if you're only creating one page, you're probably only using region-body anyway... Good luck! And please let us know what you come up with so it's in the archives! Web Maestro Clay FOP Committer (got confirmation yesterday! :-D) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
