ZF-7479: Unable to load pdf files generated by htmldoc

Issue Type: Unit Tests: Problem Created: 2009-08-04T16:58:20.000+0000 Last Updated: 2009-08-07T08:03:22.000+0000 Status: Resolved Fix version(s): - 1.9.1 (11/Aug/09)

Reporter: Fabio Napoleoni (fabio) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Pdf

Related issues: Attachments:


I've just upgraded to ZF 1.9.0 and I have a problem running my unit tests. Currently my invoices are generated by an external script which uses htmldoc, and then I've incapsulated the generated pdf file into a Zend_Pdf object with this code:

<pre class="highlight">
$temppdf =  // this is a string containig the pdf filename with full path 
$pdf = Zend_Pdf::load($temppdf); 
return $pdf; 

Until ZF 1.9 everything works, now after the upgrade I receive this exception:

  1. testCreatePdfInvoice(Model_Default_InvoiceTest) Zend_Pdf_Exception: Action dictionary must contain S entry /Users/fabionapoleoni/Downloads/ZendFramework-1.9.0/library/Zend/Pdf/Action.php:128 /Users/fabionapoleoni/Downloads/ZendFramework-1.9.0/library/Zend/Pdf/Target.php:47 /Users/fabionapoleoni/Downloads/ZendFramework-1.9.0/library/Zend/Pdf.php:530 /Users/fabionapoleoni/Downloads/ZendFramework-1.9.0/library/Zend/Pdf.php:353 /Users/fabionapoleoni/Downloads/ZendFramework-1.9.0/library/Zend/Pdf.php:292 /Users/fabionapoleoni/Documents/workspaces/php/ZenitSpot Trunk/application/modules/default/models/Invoice.php:42 /Users/fabionapoleoni/Documents/workspaces/php/ZenitSpot Trunk/test/Model/Default/InvoiceTest.php:62

I tried to comment the unlink instruction and open the pdf file with OS X Preview and with Acrobat reader, and the file is intact. I also isolated the failing row in another testcase in this way and (clearly) the test fails.

<pre class="highlight">
 * Load a pdf generated by htmldoc 
public function testLoadPdf() { 
        Zend_Pdf::load(dirname(__FILE__) . '/../Data/invoice.pdf'); 

I don't know if this is a htmldoc problem or Zend_Pdf, but I can read pdf's built with htmldoc on every operating system/pdf reader.

I put on a webserver the generated pdf the url is…


Posted by Alexander Veremyev (alexander) on 2009-08-07T08:03:21.000+0000


Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.