Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pdf generation with Rails 3

I need to generate PDFs with Rails 3.0.3.

Prawn + Prawnto looks great as showed by Ryan Bates

But I cannot make his example works, the table function is not recognized by the pdf variable

Any insight on this problem?

Thanks

like image 481
denisjacquemin Avatar asked Dec 07 '25 12:12

denisjacquemin


1 Answers

open up prawn-core-0.8.4\lib\prawn\core.rb

at the bottom of that file you will see a list of all the 'require' items. I think this is where you should add require 'prawn/layout' if you do not want it in your views. still not ideal as you are customising the plugin.

like image 177
user596916 Avatar answered Dec 09 '25 03:12

user596916



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!