Forum: Ruby on Rails Printing quality documents (invoices, etc..) from rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fa00616b4d499dc40d7c7bc713bede3c?d=identicon&s=25 Chris (Guest)
on 2006-01-29 21:55
Thanks for the info alex

All i really want to do is easily print quality invoice (+other)
documents  from within Rails.  THe info is already in the mysql
database, so rails has full access.

Is there an easy way to do it?

Thanks,
Chris
F3dc06f587d1ff4c7366b102bfda9204?d=identicon&s=25 David Mitchell (Guest)
on 2006-01-29 22:12
(Received via mailing list)
I'm just about to cross this bridge myself with an app I'm working on.
 PDF::Writer seems to be a pretty good solution - you can make a PDF
file look pretty much as good as you want, and PDF::Writer seems to be
a good compromise between ease of use and capability as far as
generating PDFs goes.

Check the sample code to see how it works.

Regards

Dave M.
Fa00616b4d499dc40d7c7bc713bede3c?d=identicon&s=25 Chris (Guest)
on 2006-01-30 01:02
I'm looking at using JasperReports with rails:

http://wiki.rubyonrails.org/rails/pages/HowtoInteg...

Looks interesting.

Has anyone had any experience with JasperReports?
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-01-30 02:10
(Received via mailing list)
It is used in a java project that I'm on at work. I haven't had too much
contact with that
part of the project, but the guy who's doing it seems very pleased with
Jasper reports. I
think it might not be as powerful/easy-to-use/well-documented as the
$$$$ report engines
out there, but it's hard to beat for the price.

I skimmed through this wiki page and have to say that the "execute a
shell script"
approach isn't the best idea. As the author points out towards the
bottom, you wind up
starting the jvm every time... ugh. And the scripts are
platform-dependent.

I'm pretty sure Jasper comes with servlets that you can drop into tomcat
or jetty. You
could have the servlet container running on it's regular port of 8080
but only accepting
connections from localhost. Or, you could seemlessly blend the jasper
reports stuff with
the rails app by proxying the url pattern for reports
(mydomain.com/reports) to the
servlet container in your web server config.

Or, just to be extremely buzzword compliant, you could do it as a web
service! :-|

Now, this isn't to say that any of this is trivial if you haven't done
it... but it's
always good to learn new things, right? You could take the script
approach to get it
working and then replace it with a daemon approach when you get it
figured out.

b

PS: we trained the client to use the iReport
(http://ireport.sourceforge.net/) gui tool
for Jasper Reports and they've been very pleased (heh, started asking if
they could
*update* their data with ireport!).
This topic is locked and can not be replied to.