Question

Has anyone had any luck getting outline generation to work with wicked_pdf on Heroku? I have no problems in dev mode (on windows!), but on Heroku I can't make outlines happen. I've tried explicit :outline => {:outline => true, :outline_level => 4} in wicked_pdf configuration to no avail. I suspect it has to do with the static 0.9.9 amd-64 version of wkhtmltopdf that Heroku requires(?). (I'm going to have another go at seeing if I can get an updated version of wkhtmltopdf to behave)

Était-ce utile?

La solution

Updating wkhtmltopdf to 0.11.0.rc1 seems to have done the trick and also resolved some minor page break issues as well.

I believe wkhtmltopdf 0.10.0.rc? was what I tried before and that did not work on Heroku.

Side note, the wkhtmltopdf-heroku gem would probably work for most people. But all it does is bring in the wkhtmltopdf binary and set configs for the pdf gems that use it. Since I need to set the config in a custom controller for use in a delayed_job and something about that fails to see the wicked_pdf initializer, it's easier for me to drop wkhtmltopdf in the project's /bin myself and set the wicked_pdf's exe_path as needed.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top