-
Notifications
You must be signed in to change notification settings - Fork 359
Gem 0.12.4 issue with image #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is very likely due to your setup with wicked_pdf and where the asset is located, and not wkhtmltopdf_binary_gem. There are many reasons this could be happening for you.
To properly simulate production asset loading, you should probably precompile your assets and set your host and asset host, or use a staging environment. You could also use Let me know how it goes! |
Is there any way to tackle of this issue as such I am not using this new version (0.12.6.2) until and unless the size will decrease. Becasue newer version exceded Heroku max slug size for me. Also strange thing for me is on local its working as expected although the page orientation default goes to landscape instead of portrait after changing version to 0.12.4 and on staging env its not rendering that page orientation as landscape also image is not rendering. |
1-3. If the output of
This gem provides a bunch of different binaries so that it works on differing platforms. It used to be a lot smaller because there was only one released "fat" binary for linux, along with one for windows and one for MacOS (3 total), but releases changed to be platform-specific. You can just pick out the one or two binaries you need out of this gem (or from the wkhtmltopdf releases page) and put them in your Gemfile group :development, :test do
gem 'wkhtmltopdf-binary'
end
group :production do
gem 'wkhtmltopdf-heroku'
end Then, when Heroku compiles it's slug, it will exclude development and test gems, and you should be within the slug size limits.
Set it up in your config if you want the default to be, and make sure you aren't specifying WickedPdf.config[:orientation] = 'Portrait' |
Thanks @unixmonkey sorry for late reply as per your suggestion for keeping wkhtmltopdf-binary and wkhtmltopdf-heroku in developement and production respectively. And its working in our staging env. |
When I try to display an image in a pdf, i've got a square, instead of the image.This works fine on local but when I check on production app it doesn't show image.
Example of code :
<%= wicked_pdf_image_tag image_url(@image_url) %>
And i'm using the pdf_from_string method.
Also I am not using initializer method is that the reason this is breaking.
Also I am so much tired of changing version from 0.12.3 to 0.12.6.2 as per this so i moved to 0.12.4 after seeing this .
The text was updated successfully, but these errors were encountered: