Subject: | [PATCH} PDF::API2 don't destroy pdf object on stringify or save and saves but leave it to the user |
Date: | Thu, 29 Nov 2012 11:47:40 +0100 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Sander Eikelenboom <linux [...] eikelenboom.it> |
Hi,
At the moment the following is not working:
$pdf = PDF::API2->new();
...
my $filename = md5($pdf->stringify() . "pdf");
$pdf->saveas($filename);
$pdf->end();
This is because stringify (and save and saveas) destroy the object.
I think it would be better to leave this to the user and let him invoke $pdf->end();
Patch is attached.
--
Sander
Message body is not shown because sender requested not to inline it.