PDF generation in rails with wicked_pdf


Bookmark and Share

Recently my friend was working on a project that had a requirement to export the html page to PDF. He had some issues setting this up. So I thought I would write this article, so that it will be helpful for anyone who faces the same issue. It’s easy getting your pdf in rails as long as you follow the right steps 😉 (But unfortunately my good friend doesnt always do that for some reason of his own – No offense intended 😉 )

If you are using Rails, then you have this wonderful rubygems where you can find a number of gems for pdf generation. The suggested ones are prawn and wicked_pdf.

Which one to chose ?

For me wicked_pdf is very simple to understand and it gets your job done very quickly if you follow all the right steps, while Prawn restricts you to the old table, grids layout. But ultimately its you who will have to decide which to use depending upon your specific requirements.

I will be using wicked_pdf and ubuntu.

Wicked_pdf

Wicked_pdf uses a shell …

Read More