Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.1
-
None
Description
If the image to be included is of type gif then it is first converted to jpeg before being added. The call to imageInit() on line 1280 fails as the library has not only been included if the variable $params['dpi'] is set.
Error Message:
Call to undefined function imageInit() in /var/www/ezpublish-4.0.1/lib/ezpdf/classes/class.ezpdftable.php on line 1280
Patch:
--- lib/ezpdf/classes/class.ezpdftable.php | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/ezpdf/classes/class.ezpdftable.php b/lib/ezpdf/classes/class.ezpdftable.php index 774ec13..ca07dfe 100644 --- a/lib/ezpdf/classes/class.ezpdftable.php +++ b/lib/ezpdf/classes/class.ezpdftable.php @@ -1274,6 +1274,7 @@ class eZPDFTable extends Cezpdf } $newMimetype = eZMimeType::findByURL( $newFilename ); + require_once( 'kernel/common/image.php' ); $img = imageInit(); $newImg = $img->convert( $mimetype, $newMimetype, -- 1.5.4.3
Steps to reproduce
Create a PDF template with a gif image and attempt to generate
Issue it pretty obvious from the error & code.