Hello.
I'm investigating the possibility to use phppptx on our platform, as well as your others products.
So my first stop as we are in the process of making this evaluation was phpdocx, which works superbly as far as the trial went and the unlocked features.
So while we do not support Powerpoint exports right now it seems a good idea to look into phppptx.
So here are two use cases that I'm trying to apply without success with the Template part.
1/ I'm using the replace HTML function, and while using it I noticed it would not accept much less things than in Word. For example no line return and no images.
Is that a current limitation (as I see the functionannly was added in 2.5), or is it something definitive.
2/ The other use case is to replace a tag via multiple images. To do this with phpdocx I'm using a Fragment and add multiple images to it then replace it with the function for this operation.
In phppptx, if I create a fragment and add an Image to it there is a crash with the following error :
"Fatal error: Uncaught Error: Call to a member function getSlides() on null in F:\temp\word\phppptx\classes\CreatePptx.php:1241"
The code is looking like this :
<?php
require_once("phppptx/classes/CreatePptx.php");
$pptx= new CreatePptxFromTemplate('f:\template.pptx');
$pptx->setTemplateSymbol('${', '}');
$pptxFragment = new PptxFragment();
$pptxFragment->addImage('image1.jpg', []);
$pptxFragment->addImage('image2.jpg', []);
$pptx->replaceVariablePptxFragment(['multiple_images' => $pptxFragment], ['type' => 'inline']);
$docx->savePptx('result.pptx');
Is that something that is impossible ? Because in my use case there can be several pictures, and it's not possible to put placeholders for an unknown number of pictures.
Thanks in advance for your answer.