From: John Joyce Date: 2007-04-28T03:41:12+09:00 Subject: Re: Looking for thoughts and opinions on Ruport, and reporting in Ruby in general. On Apr 28, 2007, at 12:14 AM, Gregory Brown wrote: > On 4/27/07, John Joyce wrote: > >> I got it. You mean you don't have CSS available to you for PDF files? > > Correct. As far as I know there is no formattting facility for PDF > that reeks of cool, much less something standardized > >> Interesting. On OS X it is a built in facility to print to PDF. >> CSS does itself present some formatting options for printing but >> they're not well implemented everywhere. The scaling options should >> be sufficient to generate nicely printable documents generally. I'm >> sure you know that though. but ... When a boss asks for a pdf they >> want a pdf. > > Right, we need to generate PDFs and email them as part of reports > that run in the middle of the night.... > > Doing html -> pdf is sometimes, but not always, a good solution. > Naturally, it would be ideal if there were general intermediary data format or document format. The best bet is often XML since we're talking about fundamentally generated styled documents from a structured document, but of course it all depends where that data is coming from and where it might go and how much overhead is really practical for functionality needs today and future functionality needs. Ideally if it is a valid xhtml document, that should be more translatable to pdf. There certainly is something to be said for generating at least vanilla xml first, since it leaves you with something far more malleable. I don't know the full spec on the various pdf specs (the multitude is the problem at times) but I do know that there is a lot there in common with xml/xhtml type documents. Here are some links on just such things. http://www.antennahouse.com/XSLsample/XSLsample.htm http://www.w3.org/Style/XSL/ http://www.digitaljunkies.ca/dompdf/ The last link is to a PHP version of such a utility. I know these are not reporting tools per se, but they could certainly provide ideas! I know many reporting tools are taking data straight out of a database. But if it is tranformed first into an xml format, then it does become highly reusable. I'm big finger wagger with sites that offer info for download as a pdf but not viewable online.