2008年8月25日星期一

[fw-core] Zend_Pdf_Exception

I recently converted a .doc to a .pdf and am using Zend_Pdf to manipulate the file. I am attempting to open the document using the following code:

/* begin code snip
   $file = 'fileToOpen.pdf';   // This file exists in the working directory already
   $pdf = Zend_Pdf::load($file);
   $page = $pdf->pages[0];
   $page->drawText('test string', 100, 100);
   $pdf->save('test.pdf');
*/ end code snip

However, I get the following error when I do that:

Uncaught exception 'Zend_Pdf_Exception' with message 'Cross-reference streams are not supported yet.' in /*****/*****/******/******/Zend/Pdf/Parser.php:331.

Does anyone know what this means? Is there a workaround for it? I'm fairly new to Zend Framework so any help is appreciated.

Thomas

没有评论: