wicked pdf not displaying amazon s3 images

2.1k views Asked by At

A very strange thing has happended to my app recently and not sure what has changed? wicked pdf is not longer displaying my https:// images from my amazon s3 server. I am using the images with the src= "https://pathtoimage.png" and they were displaying just find before.

The displaying of images is not working locally or on heroku. On my production server, the pdf rendering is not working as well and creating a bunch of blank white pages.

I am using the gem

gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
3

There are 3 answers

0
user1099939 On

Last 2 days i am facing the same problem. I have the version of wkhtmltopdf is 0.9.6. I have upgraded the version to 0.9.9. Now it's works fine.

I feel amazon might change something.

1
Jared On

It seems that the version of wkhtmltopdf that comes bundled with the wkhtmltopdf-binary, 0.9.9 has this problem. Uninstalling the gem and then installing a newer binary such as 0.12.2.1 solved this issue for me.

I'm on OS X so I installed it with homebrew but there are binaries for other systems on wkhtmltopdf.org

Here's how to install a newer version of wkhtmltopdf with homebrew:

brew install cask
brew cask install wkhtmltopdf
0
Nikhil On

This is the fork of the wkmtltopdf-binary that worked for me: https://github.com/pallymore/wkhtmltopdf-binary. Insert the following lines in your Gemfile:

gem 'wkhtmltopdf-binary-edge', '~> 0.12.2.1'