I have an issue where running the following function is returning the error report:
"Cannot create image resource. File not found.";i:1;s:2101:"#0 /var/www/html/jack-london/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('http://127.0.0....')
Here is my code:
$imgPath = Mage::getStoreConfig('sales_pdf/firegento_pdf/factoryx_logo_image'); $logo = Mage::getBaseUrl('media') . "logo/" . $imgPath;
Which is returning me the correct image path:
If I paste it into my browser, the image loads as expected.
Here is my attempt to convert the path into a Zend Image Object:
$logo = Zend_Pdf_Image::imageWithPath($logo);
This is the place in my code where my error report gets generated. I have tried adding quotations around the $logo variable like so:
$logo = "\"" . $logo . "\"";
But it didn't help at all. Not sure what I'm doing wrong here.