Re: Timing problem, putting PNG into PDF

From: Date: Thu, 21 Aug 2008 10:46:50 +0000
Subject: Re: Timing problem, putting PNG into PDF
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-278457@lists.php.net to get a copy of this message
I'm using GD to crop & save an uploaded image, and then embedding it into a PDF made with FPDI. It works great when the image is small or low-res. When the uploaded file is bigger, more than a couple hundred K or so, it fails. I think that the image is not done writing yet by the time I try to do the $pdf->Image. Any suggestions? Some way to force it to hang out and pause until the image is done writing? I know that this is naive but maybe sleep will do the job. Try to write the file and then put something like sleep(2) to give it time to finish the IO.
http://www.php.net/manual/en/function.sleep.php -- Thodoris

« previous php.general (#278457) next »