Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
Bonjour, je souhaite créer un pdf à partir d'un pdf existant j'ai donc utilisé ceci-ci :
$fileName = 'Fiche_service_technique.pdf';
$pdfpage = Zend_Pdf::load($fileName);
mais j'obtiens une erreur
Fatal error: Uncaught exception 'Zend_Pdf_Exception...
Hors ligne
Hello,
Peux-tu envoyer la trame complète de l'exception ?
A+
Hors ligne
je n'ai pas fais d'execption
Hors ligne
Hmmm,
'Fatal error: Uncaught exception 'Zend_Pdf_Exception...', si ça c'est pas une exception
A+
Hors ligne
Voila l'erreur désolé :
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Can not open 'Fiche_service_technique.pdf' file for reading.' in C:\wamp\www\JPE\Zend\Pdf\Parser.php:378 Stack trace: #0 C:\wamp\www\JPE\Zend\Pdf.php(289): Zend_Pdf_Parser->__construct('Fiche_service_t...', Object(Zend_Pdf_ElementFactory_Proxy), true) #1 C:\wamp\www\JPE\Zend\Pdf.php(242): Zend_Pdf->__construct('Fiche_service_t...', NULL, true) #2 C:\wamp\www\JPE\application\views\scripts\GererAnnulationV\imprimerliste.phtml(6): Zend_Pdf::load('Fiche_service_t...') #3 C:\wamp\www\JPE\Zend\View.php(107): include('C:\wamp\www\JPE...') #4 C:\wamp\www\JPE\Zend\View\Abstract.php(787): Zend_View->_run('.\application\v...') #5 C:\wamp\www\JPE\Zend\Controller\Action\Helper\ViewRenderer.php(921): Zend_View_Abstract->render('gererannulation...') #6 C:\wamp\www\JPE\Zend\Controller\Action\Helper\ViewRenderer.php(942): Zend_Controller_Action_Helper_ViewRenderer->renderScript('gererannulation...', NULL) #7 C:\wamp\www\JPE\Zend\Controller\Action.php(207): Zend_Controller_ in C:\wamp\www\JPE\Zend\Pdf\Parser.php on line 378
Hors ligne
Je pense qu'il ne cherche pas le fichier dans le bon répertoire. Tu peux essayer de mettre un chemin de fichier complet dans ton test pour voir si ça marche ?
A+, Philippe
Hors ligne
Pour l'instant j'ai mi mon pdf dans le répertoire de ma vue. donc je met quoi comme chemin ?
Hors ligne
Je ne sais pas où est ta vue, mais tu peux mettre (dans un premier temps pour tester)
$fileName = 'C:/www/xxx/xxx/Fiche_service_technique.pdf';
où C:/www/xxx/xxx/ est le répertoire dans lequel tu as mis ton fichier...
A+, Philippe
Hors ligne