Re: Using a jpGraph image in an FPDF pdf output...-SOLVED

From: Date: Tue, 16 Sep 2003 13:16:14 +0000
Subject: Re: Using a jpGraph image in an FPDF pdf output...-SOLVED
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162736@lists.php.net to get a copy of this message
If your are using $graph->Stroke('sometempfile'); before $pdf->Image('sometempfile'); (I bet you do), then the image should be completed. Is it happening always or just now and then? What if you wait a few seconds between the two calls? Do you call clearstatcache()? I'm asking this because I once had a similar problem. My code created a file and included it right away. But sometimes (about 10%) the file was empty or incomplete. I never managed to reproduce this in a small example, only in my few 100 line script. I also noticed other people had this problem. Jay Blanchard wrote:
[snip] fflush did not work? [/snip] No, because the graph image was not complete before the PDF was complete. Flushing the JPG would display (if no errors occured) an partial JPG within the PDF.


« previous php.general (#162736) next »