wicked_pdf_image_tag helper does not render the picture with the release 0.12.6.2.

Created on 30 Jun 2020  路  5Comments  路  Source: mileszs/wicked_pdf

Issue description

wicked_pdf_image_tag helper does not render the picture with the release 0.12.6.2.
Need to downgrade to release 0.12.4 to get the expected behavior (the picture appears)

Expected or desired behavior

wicked_pdf_image_tag helper is working well with the very last release

System specifications

wicked_pdf gem version (output of cat Gemfile.lock | grep wicked_pdf): 2.1.0

wkhtmltopdf version (output of wkhtmltopdf --version): 0.12.6.2

whtmltopdf provider gem and version if one is used:

platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar): Ubuntu 18.04.4 LTS

Most helpful comment

Just came across the very same issue, which I suspect might have been introduced as part of the 0.12.6 upgrade of wkhtmltopdf ("https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4536: BREAKING CHANGE: block local filesystem access by default")

Following the advanced usage instructions from here: https://github.com/mileszs/wicked_pdf#advanced-usage-with-all-available-options, I explicitly set enable_local_file_access: true, which resolved my issues and I was able to use the most recent version of both gems. 馃憤 Hope this helps anyone.

All 5 comments

That does not sound like a problem with wicked_pdf, but with wkhtmltopdf. The reason you picture likely isn't loading with the newer version for you, is that the system it is installed on must have the right supporting libraries (namely OpenSSL), otherwise it won't display images served open HTTPS.

It appears your system doesn't have what's needed to properly run the new version of wkhtmltopdf.

Please try installing one of the official packages from https://wkhtmltopdf.org/downloads.html, or use your package manager, which should be able to work out those dependencies.

@unixmonkey please help. I am also having this issue, even though I am using the latest version of every package,

wkhtmltopdf version (output of wkhtmltopdf --version): wkhtmltopdf 0.12.6 (with patched qt)

wkhtmltopdf-binary (0.12.6.2)

wicked_pdf (2.1.0)

It's not working on Mac localhost, Linux Ubuntu on an AWS Cloud9 environment, as well as in our production environment running on Amazon Linux 2, all these OSes have OpenSSL installed.

Update: I downgraded wicked_pdf and wkhtmltopdf-binary

gem 'wicked_pdf', '~> 2.0.2'
gem 'wkhtmltopdf-binary', '~> 0.12.5.4'

using it together with the latest version of the software - wkhtmltopdf 0.12.6 (with patched qt)

and I can confirm that wicked_pdf_image_tag worked with this combination

Just came across the very same issue, which I suspect might have been introduced as part of the 0.12.6 upgrade of wkhtmltopdf ("https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4536: BREAKING CHANGE: block local filesystem access by default")

Following the advanced usage instructions from here: https://github.com/mileszs/wicked_pdf#advanced-usage-with-all-available-options, I explicitly set enable_local_file_access: true, which resolved my issues and I was able to use the most recent version of both gems. 馃憤 Hope this helps anyone.

With this option enabled it still renders no images for me.
I use just normal image_tag though. If I use wicked_pdf_image_tag i get the error: /tmp/signature20200826-92-1pia1fw.png is no longer under a load path: /app/app/assets/fonts, /app/app/assets/images .....

I'm running

    wicked_pdf (2.1.0)
    wkhtmltopdf-binary (0.12.6.2)

And when I use wkhtmltopdf-binary (0.12.5.x) it works fine.

Can anyone help me? 馃槙

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olleolleolle picture olleolleolle  路  4Comments

VladFarion picture VladFarion  路  4Comments

BlakeWard picture BlakeWard  路  3Comments

gregblass picture gregblass  路  4Comments

nathanhinchey picture nathanhinchey  路  6Comments