I'm using FoomanPDF on a Magento 1.9 shop. In the mypdf file i found the following function:
if ($productImage
&& $productImage != "no_selection"
&& file_exists(Mage::getBaseDir('media').$imagePath)
) {
$imageAttr = $product->getImage() ? 'image' : 'small_image';
$imageHelper = Mage::helper('catalog/image')->init($product, $imageAttr)->resize(100);
return (string)$imageHelper;
}
However this way of adding the images becomes utterly slow when you have more then 5 products in a single PDF. Is there a way to improve the speed? Or make sure Magento is not resizing the initial 1920x1080 images into some small 500px image? I think it's using up a large amount of memory this way.Result, 504, gateway timeout!
Any thoughts?