0

I'm having a bit of a problem with wkhtmltopdf. It won't display jpg images but works perfectly with png images. I've tried converting the images to base64 and inserting them directly into my html. When i render the html it works, but it won't when i pass the html file to wkhtmltopdf.

I get no error from when i execute the command and the PDF is generated smoothly, it just lacks the images.

I'm using wkhtmltopdf 0.12.3.2 on Debian 9 Stretch.

Does anyone have the same issues ?

LyesB
  • 1
  • 1
  • Are the images RGB? I'd check that first. PDF supports CMYK and others, but it could be possible wkhtmltopdf has problems with converting it. – Chris Haas Apr 01 '21 at 14:09

1 Answers1

0

I upgraded to wkhtmltopdf 0.12.5 and it solved the problem

For those who have the same problem, here is how I managed to upgrade:

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb

sudo dpkg -i wkhtmltox_0.12.5-1.stretch_amd64.deb

sudo apt-get install -f

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin

sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
Dharman
  • 30,962
  • 25
  • 85
  • 135
LyesB
  • 1
  • 1