wicked pdf not displaying amazon s3 images

吃可爱长大的小学妹 提交于 2020-01-02 11:05:16

问题


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'

回答1:


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'




回答2:


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.




回答3:


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


来源:https://stackoverflow.com/questions/30837231/wicked-pdf-not-displaying-amazon-s3-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!