ZF-11348: Patch to add Remote image writing on PDF from HTTP/S Source

Issue Type: Improvement Created: 2011-05-05T23:37:51.000+0000 Last Updated: 2011-05-05T23:37:51.000+0000 Status: Open Fix version(s): Reporter: Oscar Frowijn (oscarfrowijn) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Pdf

Related issues: Attachments:


Zend_Pdf did not allow image creation from a remote source, I.E. HTTP. Unfortunately for dynamic image parsing from the web, we needed this functionality

A simple fix for us was to modify PDF/Resource Class Zend_Pdf_Resource_ImageFactory::factory

below our fix

class Zend_Pdf_Resource_ImageFactory { public static function factory($filename) { // Oscars check remote file here.., read one char in to minimize traffic if((!is_file($filename) ) && ( file_get_contents( $filename, NULL, NULL, 0, 1) === false)) { require_once 'Zend/Pdf/Exception.php'; throw new Zend_Pdf_Exception("Cannot create image resource. File not found local or remote.");


If this could be added in the next release we would be very grateful.

Best Regards, Oscar Frowijn Ozkat Technologies


No comments to display

Have you found an issue?

See the Overview section for more details.


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

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