forked from mileszs/wicked_pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
miguelakira edited this page Jul 13, 2012
·
2 revisions
WickedPdf configuration for Ruby on Rails application wise put the following code in a initializer file say in 'wicked_pdf.rb'
WickedPdf.config = {
:exe_path => '/usr/bin/wkhtmltopdf',#if wkhtmltopdf is installed at this path
:layout => 'pdf.html',
:orientation => 'Landscape',
:page_size => 'Letter',
:footer => { :html => {:template => "layouts/footer.pdf.erb"} }
}
or pass these options for specific pdf rendering in an action
format.pdf {
render :pdf => 'file_name.pdf',
:layout => 'pdf.html' # for pdf.html.erb
}