Saturday 14 November 2009 12:27:44 pm
Zend 1 - 0 eZComponent Today i build a module that contains a view that generate a pdf file. On previous installations we use a custom pdf lib (non standard, got some issues, not OO etc..), as ez4.1 comes bundle with ezc, i gived it a try. but unfortunatly got an issue with Haru driver. the doc shows the following: The Haru driver is pretty fast, but currently has issues with some special characters. It is the default driver, but can be explicitly used by setting the driver option on the PDF class, like: $pdf = new <a href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdf.html">ezcDocumentPdf</a>();
$pdf->options->driver = new <a href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdfHaruDriver.html">ezcDocumentPdfHaruDriver</a>();
pretty nice. Unfortunatly the constructor instanciate a HaruDriver, so you cannot switch to another driver if you don't have haru working on your env ;( So i switch to Zend_Pdf component. Works like a charms Step to install:
- Download ZendFramework
- Create folder $EZ_HOME/lib/zf
- Unzip your tarball
- copy Zend/Pdf/* and Zend/Pdf.php to $EZ_HOME/lib/zf
- add a line to $EZ_HOME/autoload.php to add ./lib/zf to the php include path
- generate autoloads php bin/php/ezpgenerateautoload.php
Works like a charm (without any fancy Haru lib) The Haru driver is pretty fast, but currently has issues with some special characters. It is the default driver, but can be explicitly used by setting the driver option on the PDF class, like: $pdf = new <a href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdf.html" mce_href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdf.html">ezcDocumentPdf</a>();
$pdf->options->driver = new <a href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdfHaruDriver.html" mce_href="http://www.ezcomponents.org/docs/api/trunk/Document/ezcDocumentPdfHaruDriver.html">ezcDocumentPdfHaruDriver</a>();
--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony
|