Bharat Jain
Bharat Jain

Reputation: 29

HTML image (generated by a PHP script) is not displaying in a PDF when converting with wkhtmltopdf

I want to display an image in a PDF file. I am using wkhtmltopdf for conversion, like this:

<img src="GetChart.php?&type=PNG&img=bop1&id=vvb0qfkomeqf1nt2hnscraj2q751f25dc72c4ec" alt="The image">

I am able to see the image in HTML, but it is not displaying in the PDF.

Upvotes: 0

Views: 795

Answers (1)

Arman H
Arman H

Reputation: 5618

You need to specify an absolute path to GetChart.php.

If it's running on your local machine, try <img src="http://localhost/GetChart.php?....

Upvotes: 2

Related Questions