How to generate a PDF from html.erb file..

Hello friends, I have a task in which i need to generate a pdf file from the html.erb file. and seriously i don’t have any clue. So pleas help me out…

Thanks abhishek

Be prepared to shell out quite a bit of money for the exorbant license fee, but:

http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails

Best regards

Peter De Berdt

Looks like maybe a job for PHP which has a nice class library for doing PDF... Maybe somebody could port it to Rails?

~DC

Have a look at <http://code.google.com/p/cnruby/wiki/RailsPluginActiveFPDF&gt;\. I have no experience using it, but it looks up to date and the templates are ok (as far as pdf generation goes..), e.g. <http:// cnruby.googlecode.com/svn/trunk/rails-plugins/active_fpdf/app/views/ pages/pdfs/show-06.rfpdf>.

Another option is to generate LaTeX documents using erb and post- process these using pdflatex. Should be doable in less than 50 lines of ruby, but IMO not practical unless you're comfortable with LaTeX.

Isak