ZF-11348: Patch to add Remote image writing on PDF from HTTP/S Source
Description
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
Comments
No comments to display