On Thu, Jul 02, 2009 at 04:29:01PM +0530, Pravinc wrote:
> Hey all,
> I am working with generating PDF using Dom PDF.
> My problem is when I generate a single PDF , Its working fine.
> But when I code it in a loop for generating more than one PDF it gives some
> $DomObj = new DOMPDF();
> $pdf = $DomObj->output();
> slip.pdf", $pdf);
> the above code is in a loop
> I come to know that ,there is problem with memory leak.
> Also I thought that it was because I had not destroy the previously created
> So I also tried destroying it using unset.. I don't know whether its
> destroying or not.
> Error is something like
> "Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'No
> block-level parent found. Not good.' in
> Stack trace: #0 D:\foldername\ project
> Inline_Positioner->position() #1 D:\foldername\ project
> Can anyone please give me some way to solve this.
I had an error something like this when using FPDF. It would hack up the
second PDF. I didn't investigate it a lot, but my solution was to
instantiate the class *once*, and loop on the *rest* of it.
Paul M. Foster
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php