Pdf generation

Hi

  Can anybody which is the best pdf generator in rails.There are

many like

*  HTMLDOC
* PdfWriter
* PDF::Writer (Austin Z.)
* Ruby FPDF
* JasperReports
* PDF Form Fill
* PDFlib and PDFlib-Lite
* Rfpdf

Can anybody suggest which is the best among these?I am beginner in ror

Sijo

I don’t have an experienced or educated opinion on which is the best
pdf generator in rails but I know Peepcode has a PDF on the topic:

http://peepcode.com/products/rails2-pdf

Hi

Is it for rails2.0? .But I am using rails 1.2.5

Sijo

It depends on your needs. PDF::Writer is, I think, the most widely
used, but you have to control it using its own language to describe
the page. This is fine if you’re generating simple PDF files but
rapidly gets complicated if you’re generating rich documents.

If you have a page formatted in HTML and CSS and you want to create a
PDF of it, that is a much harder problem. I haven’t used it myself,
but there have been several reporrts that PrinceXML is by far the best
solution. Unfortunately, it is not open-source and not inexpensive.

There’s a nice writeup that compares the alternatives here:
http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails

Michael S.
www.BuildingWebApps.com
Resources for Rails Developers

Thanks for your reply

It is very nice…Is their any open source equivalent to that

On 08 Feb 2008, at 06:19, Sijo Kg wrote:

It is very nice…Is their any open source equivalent to that

No, there’s nothing out there that comes even close to what PrinceXML
does. It’s unbelievably fast, reliable and easy to work with and
support is very responsive, which is essential for a closed source
product. It is a hefty price tag, I completely agree, especially when
you deploy your applications on customers’ servers. You could apply
for an OEM license if this is the case, although I doubt it will
really bring the pricetag down very much.

Best regards

Peter De Berdt

I’m sorry. I made a mistake. It doesn’t deal with creating PDFs. Here
is a screencast on generating PDFs:

JasperReports iReport is very powerful. Outputs first class reports
directly from a database as well. It is also free. There is a
learning curve with iReport and requires understanding database
relationships but it performs flawlessly producing pdf, rtf, xls, and
others.

Outputting reports from a Rails app works quite well but it is a bitch
to set up. I had to hire a Java guy to help with a one time setup.,
but it was worth it. I can now create my own reports quite easily.
Again the Java setup is the tough part. If anyone wants his email let
me know.

Someone suggested a plugin, I think that is a great idea.

You can find a description of setting up the interface between rails
and JasperReports here :
http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports

I actually updated the description after setting it up succesfully on
my own development machine. In the end it proved to be not all that
difficult.

Nothing is as good as Prince…I should know :stuck_out_tongue:
http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails

On Feb 5, 2008 9:42 PM, Sijo Kg [email protected]
wrote:

  • JasperReports

seth at subimage interactive

http://sublog.subimage.com

Cashboard - Estimates, invoices, and time tracking software - for free!
http://www.getcashboard.com

Substruct - Open source RoR e-commerce software.
http://dev.subimage.com/projects/substruct

On Feb 8, 5:04 pm, FlexRails [email protected] wrote:

You can find a description of setting up the interface between rails
andJasperReportshere :http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports

I actually updated the description after setting it up succesfully on
my own development machine. In the end it proved to be not all that
difficult.

I’ve got ROR to create an XML file. I’ve pasted it to notepad…treid
to read it with ROR - no good !

I’ve been trying to use iReports -with various XML files and have had
varying degrees of success.
The most frustrating thing is that the [read fields] button will not
read in the fields data from the xml file for every XML file I create.
The field panel will not open on the right.
The respone to the read fields button varys from ignoring it, message
saying found nodes: 6, seaching for… etc, but no reading of
fields.
I’m using ver. 2.0.4 of iReport.
Using XPATH2 in all cases, it seems to me that iReports is
erratic…

I started with an attempt to generate an XML file from Ruby as
suggested in ;-http://wiki.rubyonrails.org/rails/pages/
HowtoIntegrateJasperReports
I pasted the XML text into Notepad and saved , encoding as UTC-8.
No good … iReports would not read fields…

Is there a line by line tutorial on reading in XML files into
iReports ?

I did find one on the iReport site and copied a suggested XML file -
Lo and Behold it worked !
However I cannot see any difference between it and the XML file I
created.
How can it be that XML files that appear to be formatted identically,
can respond so differently…

At this stage I’m totally puzzled…
( At times like this I remember the advise in the world according to
GARP — “…keep passing the open windows…”)

Is http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports
still valid for iReports ver 2.0.4 …
Grasping at straws…

I eventually want to access a database from a Ruby on Rails
Application and output to PDF…

iReports is brilliant , when i can get it to read the data…

By the way, does everybody have the issue with Javaw.exe taking ages
to interface with Windows XP whenever an OPEN/BROWSE/SAVE is used ??

Denis

And continuing this thread after more than a year
Is there any new PDF generator other than the above and more
powerful, in ROR world now?

Although I’ve never used it, I discovered Prawn the other day (see the
link on the page for Prawnto, a Rails plugin which uses Prawn).
http://prawn.majesticseacreature.com/

Robert

If I recall correctly, prawn grew out of PDF::Writer (I still use this
one, mainly due to the code I wrote to drive it, but I should probably
explore prawn, now that it has had some time to mature).

On Jun 22, 3:29 pm, Sijo Kg [email protected] wrote:

And continuing this thread after more than a year
Is there any new PDF generator other than the above and more
powerful, in ROR world now?

Posted viahttp://www.ruby-forum.com/.

Although I’ve never used it, I discovered Prawn the other day (see the
link on the page for Prawnto, a Rails plugin which uses Prawn).
http://prawn.majesticseacreature.com/

Robert

Ar Chron wrote:

Although I’ve never used it, I discovered Prawn the other day (see the
link on the page for Prawnto, a Rails plugin which uses Prawn).
http://prawn.majesticseacreature.com/

Robert

If I recall correctly, prawn grew out of PDF::Writer
[…]

So far as I know, you do not recall correctly. I believe Prawn was
independently developed.

In any case, Prawn’s very nice to use and I generally recommend it
highly. Among other things, I seem to recall that it handles UTF-8 text
far better than PDF::Writer.
Ryan B. has a Railscast that should get you started with Prawn.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]