pallymore / wkhtmltopdf-binary-edge

this is forked from tolgap/wkhtmltopdf-binary .
MIT License
74 stars 33 forks source link

HTML not rendering properly #5

Closed tgoldenberg closed 9 years ago

tgoldenberg commented 9 years ago

I switched over from wkhtmltopdf-binary to this gem in order to render images properly, and that works. However, it is rendering empty boxes in certain parts of my HTML. If I switch back the Gemfile to wkhtmltopdf-binary, the HTML renders but not the images. Any ideas / suggestions??? Thanks!

pallymore commented 9 years ago

hello could you post some sample codes? (that are producing empty boxes in the PDF)

tgoldenberg commented 9 years ago

https://gist.github.com/tgoldenberg/6c2d86e387c17756ea07

pallymore commented 9 years ago

I will test that after work :)

BTW, usually I try to avoid using remote images in the html. Could you try:

  1. Use Base64 images in the file (http://b64.io/)
  2. Use local images only

and - are you using any wkhtmltopdf wrapper gems? (like wicked_pdf or wise_pdf) I think you might need to use a different helper method other than image_tag to insert images.

tgoldenberg commented 9 years ago

So Base64 worked - I had never tried that before! But I used it with the wkhtmltopdf-binary gem, not the -edge version. I am using wicked_pdf gem. Still think there must be some way to fix some of these issues to make it more clear on how to use images. Also my issue is only fixed with the wkhtmltopdf-binary gem, not this one. So I would check out why the blank boxes are appearing as well... Thanks!