Rails 3.2 wicked_pdf image not working
im using Rails 3.2 and wicked_pdf + wkhtmltopdf binary gem i try to render image to pdf but it doesn't work,
I tried
<%= image_tag "image.png" %>
and
<img src="/assets/images/image.png">
<img src="/public/image.png">
without success.
The rest of the PDF document is perfectly readable, with the exception of images. What am I doing wrong?
+3
user1350443
source
to share
1 answer
wkhtmltopdf needs to know the full path to the image files and you supply relative ones. Either update them to use the full url or try the helper wicked_pdf_image_tag
. I haven't tried the last route, but it should solve what you are trying to do.
Here
+5
d_ethier
source
to share