0

I am using wkhtmltopdf for make pdf but anything work except image that doesn't display.How fix?

IN localhost:3000 it work but when deploy on server it does't work.

Joel Peltonen
  • 13,025
  • 6
  • 64
  • 100
  • It may be a permissions issue on the system that you are running the service on. Be sure that the account running the software and accessing wkhtmltopdf has the rights on the directory to read, write and execute. Are there any errors in the log file? – ScottJShea Jan 21 '12 at 06:05
  • What image was it? GIF? What OS, windows 7? Lots more information plz – Joel Peltonen Dec 20 '12 at 14:47

1 Answers1

0

This could be related to an issue wkhtmltopdf has with SSL. Do you access the production server via HTTPS? If so, use absolute paths rather than relative paths to your image resources. That means:

wont work:

<img src="/image.jpg" alt="" />

might work:

<img src="https://example.com/image.jpg" alt="" />

If this solves your issue, the following thread might provide further solutions if you want to avoid this workaround: wkhtmltopdf issues rending images from HTTPS on GitHub