views:

228

answers:

3

Main-Question

What's your fast and reliable (as in "stable") solution to create on-demand, newspaper-like (as in "using advanced layout or typesetting") PDFs out of an application on a Linux server?

Therefore: No, HTML2PDF is not the solution I'm looking for. ;-)


Bonus-Question

And if it's not Ruby-based: Is there a way to steer your solution out of a Rails application? Preferably over a webservice or a something-2-Ruby-bridge-kind-of-thing?

Thanks a lot for your suggestions!

Update

There's a similar question and the rtex gem suggested there looks like what I'm looking for. I'll keep this question unanswered to look if there are other suggestions.

+1  A: 

Typesetting well is hard.

If you can't find a ruby typesetting library, you may want to look at running a background pdflatex. LaTeX source is pretty easy to generate programmatically.

How useful this idea is will depend a bit on how complicated your documents are, and how much you care about the quality of output. If you have simple text only, and only want something a bit better than html, you probably have more options.

simon
+1  A: 

Prawn is designed for this type of thing, and it's under current development.

Tim Sullivan
Do you know a real-world example where Prawn has been used in an environment as the one I described? I'm a bit unsure about how flexible Prawn is regarding to newspaper-like typesetting.
Javier
Prawn seems to be "alpha-level software". In other words: It's not an option to solve my problem.
Javier
+1  A: 

With php I've had great luck with FPDF. I generate a few thousand high quality reports everyday with it. Never misses a beat and is pretty quick. With php running on a webserver, I imagein it wouldn't be too hard to setup ruby to feed the php page the data required to generate and then ruby pick up the result.

EDIT: It looks like there is a port for Ruby. http://zeropluszero.com/software/fpdf/

rfusca