i\'m having problems with dompdf, the images i insert wont read when converted to pdf file
when i load it to dompdf using
php method
I had this same problem.
Correct it by setting the file dompdf_config.inc.php
:
def ('DEBUGKEEPTEMP', true);
Hope this helps.
Setting DEBUGKEEPTEMP
to true worked, but if you are paranoid, and wary of the effect of turning this on, you can also add self::$_cache=array();
to the end of class Image_Cache's clear();
Are you loading this code directly into dompdf:
$html = '<img src="<?php echo $_POST["sig"]; ?>" />';
$dompdf->load_html($html);
or
$dompdf->load_html_file(foo.php);
Or are you loading the processed PHP document:
$html = '<img src="' . $_POST["sig"]; . '" />';
$dompdf->load_html($html);
or
$dompdf->load_html_file('http://example.com/foo.php');
If the PHP content is not being processed prior to loading it into dompdf then it will not be processed at all. By default (as of 0.6.0) does not process any PHP code in the HTML document. You would have to set DOMPDF_ENABLE_PHP to true.
I had the exact same problem, no images were displaying for me - background images and inline ones.
I had to set DOMPDF_ENABLE_REMOTE
to true in your config dompdf_config.inc.php
Just note the security risk if you have this enabled along with DOMPDF_ENABLE_PHP