Skrol29 / opentbs

With OpenTBS you can merge OpenOffice - LibreOffice and Ms Office documents with PHP using the TinyButStrong template engine. Simple use OpenOffice - LibreOffice or Ms Office to edit your templates : DOCX, XLSX, PPTX, ODT, OSD, ODP and other formats. That is the Natural Template philosophy.
http://www.tinybutstrong.com/opentbs.php
70 stars 17 forks source link

Question #7

Closed montac closed 5 years ago

montac commented 5 years ago

Hi,

Can you give an example of how to add a new slide to the archive with the code below from the documentation please ?

I dont Inderstand what the variable $Data should contain.

// OpenTBS >= 1.6.0
$TBS->Plugin(OPENTBS_ADDFILE, $Name, $Data, $DataType=OPENTBS_STRING, $Compress=true);

Thank you.

Skrol29 commented 5 years ago

Hello,

Adding a new slide in a PPTX or an ODP is not as simple as adding a file in the archive. There is lot of modification in other XML files in order to be compliant with the format.

Thus, OpenTBS has no feature for adding a new slide in a presentation for now. But it can delete existing slides. So a work around is to create optional slides in your template and delete unwanted slides during the merging.

montac commented 5 years ago

Thank you for these clarifications.