我已经将代码添加到php文件中,以便在magento中生成pdf。当前,每种产品的图像都显示在列中,但它是颠倒显示的。
我的代码:
foreach ($line as $column)
{
if($i == 1 && $flag)
{
$i++;
if(array_key_exists('is_image', $column) && !is_null($column['text']))
{
$image = \Zend_Pdf_Image::imageWithPath($column['text']);
$feed = $column['feed'];
$page->drawImage($image, $feed, $this->y, $feed+70, $this->y-80);
$maxHeight = 100;
}
continue 1;
}
$i++;
}发布于 2018-09-19 15:30:29
使用Emizen Tech模块打印带有产品图片的pdf发票时也遇到了同样的问题。我把这行改好了
$page->drawImage($image, $feed, $this->y, $feed+70, $this->y-80);至:
$page->drawImage($image, $feed, $this->y-80, $feed+70, $this->y);现在,该图像将正确显示在发票上。
https://stackoverflow.com/questions/50091951
复制相似问题