我是第一次使用PhpPresentation,并且试图将图像添加到表格单元格中,但是没有任何效果。有没有一种方法可以在表格单元格中添加图像。这是我的代码:
// Create slide
echo date('H:i:s') . ' Create slide'.EOL;
$currentSlide = createTemplatedSlide($objPHPPresentation);
// Create a shape (table)
echo date('H:i:s') . ' Create a shape (table)'.EOL;
$shape = $currentSlide->createTableShape(2);
$shape->setHeight(200);
$shape->setWidth(600);
$shape->setOffsetX(150);
$shape->setOffsetY(300);
// Add row
echo date('H:i:s') . ' Add row'.EOL;
$row = $shape->createRow();
$oCell = $row->nextCell();
//I want to add it here
$oCell = $currentSlide->createDrawingShape();
$oCell->setName('Part page');
$oCell->setDescription('Page');
$oCell->setPath('C:\xampp\htdocs\agrikol\img\logo.png');
$oCell->setOffsetX(300);
$oCell->setOffsetY(150);
$oCell->setHeight(400);
$oCell->setWidth(400);
$oCell->getActiveParagraph()->getAlignment()->setMarginLeft(40);
$oCell = $row->nextCell();
$oCell->createTextRun('Second cell');