Zunenonooo / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Cache images problem #527

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
To use the same image many times to generate any PDF document.

What is the expected output? What do you see instead?
Only the first image is showed on PDF doc, the others doesn't load.

What version of dompdf are you using? What version of PHP? On what
operating system?
DOMPDF 0.6.0-beta3
PHP 5.3.10-1ubuntu3.2 with Suhosin-Patch
Ubuntu 12.04 64bits

Original issue reported on code.google.com by djalmaol...@gmail.com on 16 Aug 2012 at 9:38

GoogleCodeExporter commented 8 years ago
To clarify, are you generating multiple PDF document using the same instance of 
dompdf? If so this bug has been addressed. Please take a look at issue 17 or 
issue 431 for a solution. You can also download a nightly, which already 
includes the fix: http://eclecticgeek.com/dompdf

Original comment by eclecticgeek on 17 Aug 2012 at 4:47

GoogleCodeExporter commented 8 years ago
Yes, I get this problem on the same instance.

My issue is seems with Issue 431, but I did a work around to avoid this 
problem, I add on final files name something like that "?12312312323".

Example:
before "image.jpg"
after  "image.jpg?<?=microtime(true)?>" // "image.jpg?1345203552.0615"

And this way all repeated images was showed.

I have to fix too file "image_cache.cls.php" near line 152 where I had:

 "unlink($file)" 

to:

if ( file_exists($file) ) {
    unlink($file);
}

To avoid get php errors message about some missing file on /tmp dir;

Thanks!

Original comment by djalmaol...@gmail.com on 17 Aug 2012 at 11:48

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 20 Aug 2012 at 3:36

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16