Sam Kong
Sam Kong

Reputation: 5810

wkhtmltopdf --enable-smart-shrinking doesn't shrink

I am developing a rails application using PDFKit. I need to shrink the output into one page. So I passed --disable-smart-shrinking=>false. (I tried --enable-smart-shrinking=>true but it doesn't make difference)

  PDFKit.configure do |config|
    config.wkhtmltopdf = "/some/path/wkhtmltopdf"
    config.default_options = {
      :encoding=>"UTF-8",
      :page_size=>"Letter",
      :margin_top=>"0.25in",
      :margin_right=>"0.5in",
      :margin_bottom=>"0.25in",
      :margin_left=>"0.5in",
      :disable_smart_shrinking=>false
    }
  end

Shrinking works on my dev machine(OS X) but doesn't on the production server (Linux). Version 0.11.0 rc1 on the linux doesn't shrink. Version 0.9.9 on my OS X shrinks.

Can you help me with it?

Thanks.

Sam

Upvotes: 2

Views: 4003

Answers (1)

Peter Brown
Peter Brown

Reputation: 51697

Some options (including the one you mentioned) only work with a patched version of QT. http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html Unfortunately I don't know any more than that, but it should get you in the right direction.

Upvotes: 1

Related Questions