wkhtmltopdf not loading images

457 views
Skip to first unread message

kilian

unread,
Sep 21, 2016, 1:39:27 PM9/21/16
to wkhtmltopdf General
Hello,
i use wkhtmltopdf on a server on df.eu with the command

/kunden/xxx_yyy/appl/wkhtmltox/bin/wkhtmltopdf -L 20mm -R 20mm -T 20mm -B 20mm --footer-center "Seite [page]" --title "E-Book zum Kurs auf www.xyz.de" bla.html bli.pdf 2>&1

it is a great tool - thanks for creating it! But unfortunately i got a problem using it...

My PDF has about 100 pages with arround 40 images included. I use absolute paths and SSL which is obviously not the problem because most ssl-images are visible.

But not every image is visible in the PDF. it even chances from time to time which image is visible and which not.
Some of them have only the css border...

I triple checked the image paths to make sure that its not the problem... i also used W3 validator to check the html file to be valid.
I gues the reason are the loading times... maybe wkhtmlttopdf starts rendering before everything is loaded?

Does anybody have a tip?
Unfortunately i cannot upload the pdf because it contains copyrighted material from stock photo databases...

kilian

unread,
Sep 21, 2016, 1:46:10 PM9/21/16
to wkhtmltopdf General
...i have to request the images using the external url because they will be resized by an php script...

vre...@gmail.com

unread,
Sep 26, 2016, 4:16:02 PM9/26/16
to wkhtmltopdf General
I once had a similar problem, and it was due to centos disabling keepalive connections by default in apache configuration 
Hope this helps 
Reply all
Reply to author
Forward
0 new messages