igor-alexandrov/wisepdf

Unrecognized option disposition

kevynlebouille opened this issue · 3 comments

Hi Igor,

Since wisepdf upgrade from 1.0.1 to 1.1.3, a new argument appears in command line

"--disposition" "inline"

With wkhtmltopdf 0.10.rc2, it's not an available option

Unknown long argument --disposition

Could you tell me how to remove that arg with wisepdf initializer ?

Thx,
Kevyn

Can you show me how do you call it from your controller?

Debug line in log

 "/Users/kevyn/Rails/whbab/script/wkhtmltopdf" "--encoding" "utf8" "--disposition" "inline" "--quiet" "-" "-"

Initializer

 Wisepdf::Configuration.configure do |config|
  config.wkhtmltopdf = "#{Rails.root}/script/wkhtmltopdf"
  config.options = {
    :encoding => 'utf8',
    :layout => "pdf.html",
    # :show_as_html => Rails.env.development?,
   }
 end

Controller action

respond_to do |format|
  format.html # show.html.erb
  format.pdf  { render :pdf => "whbab_#{@army_list.id}" } # show.pdf.erb
  format.xml  { render :xml => @army_list }
end

Fixed in wisepdf 1.2.0.
Sorry for 1.1.x release it was a hotfix for my internal needs.