Php Magento 2 pdf-倒置显示的产品图像
我在php文件中添加了代码,以便在magento中生成PDF。当前,每种产品的图像都显示在列中,但显示方式是颠倒的 我的代码:Php Magento 2 pdf-倒置显示的产品图像,php,magento,pdf,magento2,Php,Magento,Pdf,Magento2,我在php文件中添加了代码,以便在magento中生成PDF。当前,每种产品的图像都显示在列中,但显示方式是颠倒的 我的代码: foreach ($line as $column) { if($i == 1 && $flag) { $i++; if(array_key_exists('is_image', $column) && !is_null($column['text'])) { $image = \
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++;
}
Emizen技术模块在打印带有产品图像的pdf发票时也存在同样的问题。我改了这条线把它修好了
$page->drawImage($image, $feed, $this->y, $feed+70, $this->y-80);
致:
现在,图像将正确显示在发票上
$page->drawImage($image, $feed, $this->y-80, $feed+70, $this->y);