简体   繁体   中英

wkhtmltopdf won't display jpg images

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM