This is my first time on this list so I hope I’m not breaking any
ettiquette rule by posting here.
I have been using ruby and rails for about 3 months now and enjoying it
I am working on a project. It involves ruby on rails. The development
is being done on InstantRails under Windows 2000 but the final product
is expected to reside on a Linux server.
However I have been in the process of trying to generate PDFs. I’ve
been using pdfwriter and seems to be working quite well. It also has
capability of creating tables. The basic idea is to provide hard copy
of the same information that is on screen which includes html tables,
formatted using css, and also includes graphics (barcharts created
The only problem is that the tables created using pdfwriter are a lot
more limited than those created in html. For instance no column
spanning which I use for creating the heading. To be more precise I
have something like this. Excuse text formatting…
-------- ----- Previous Year — ----- Current Year — Comparison
Week Profit Days Profit % Profit Days Profit % %Diff $Diff
Excuse the “----” characters which I have just put in to help space
things out. See the two row heading. Major headings “Previous Year”
and “Current Year” span a number of other headings underneath. This
pdfwriter does not appear to be able to do. (please correct me if I’m
Hence I am looking for a better solution. One thought it that maybe I
can use some other library or tool for converting the html table to an
image and then including that in the pdf. Someone suggested htmldoc but
that looks very unstable as there is a list of kludges that were
required for it to work such as it launches the actual table in a
browser and then screen captures it using ImageMagick. Not suitable for
a web application that could be serving up multiple clients at one time.
Will consider commercial tools as well but would prefer open source
tools if possible.
Thanks in advance.