使用Magento2中的Zend Framework在PDF上绘制图像时出错

时间:2018-02-15 06:07:43

标签: zend-framework magento2

我正在使用Zend Framework在Magento-2中创建目录PDF。我的代码是在PDF上打印目录图像。

foreach ($collection as $product) 
    {
    $image = $product->getImage();
    $path =  $mediaUrl."catalog/product".$image;
    $imagef = Zend_Pdf_Image::imageWithPath($path);
    // write image to page
    $page->drawImage($imagef, 50, 50, 400, 400);
    }

但它对我不起作用。

0 个答案:

没有答案