$pdf->update() Saves a previously opened document. <...> $pdf->end() Remove the object structure from memory. PDF::API2 contains circular references, so this call is necessary in long-running processes to keep from running out of memory. This will be called automatically when you save or stringify a PDF.