transform
- getTemplateVariables
- getTemplateVariablesType
- removeVariableAudio
- removeVariableImage
- removeVariableText
- removeVariableVideo
- replaceVariableAudio
- replaceVariableHtml
- replaceVariableImage
- replaceVariableList
- replaceVariablePptxFragment
- replaceVariableTable
- replaceVariableText
- replaceVariableVideo
- setTemplateSymbol
transform


Transforms presentations into other formats (PPTX, PDF, PPT, ODP).
Description
public transform($source, $target, $method = null, $options = array())
This method allows to transform a presentation, generated or not with phppptx, into PDF, PPTX, PPT and ODP preserving, as much as possible, the original formatting options.
You may find more info regarding this method in the Conversion plugin section.
Parameters
source
Path to the presentation that you want to convert to a different format.
target
Path to the resulting transformed presentation (PDF, PPTX, PPT or ODP).
method
Method used to transform the presentation: 'libreoffice', 'mspowerpoint'
'libreoffice' method options
The possible keys and values are:
Key | Type | Description |
---|---|---|
debug | bool | Returns debug information about the conversion plugin. Default as false |
escapeshellarg | bool | Applies escapeshellarg to escape source and LibreOffice path strings. Default as false |
extraOptions | string | Extra parameters to be used when doing the conversion. |
homeFolder | string | Set a custom home folder to be used for the conversions. |
path | string | Sets the LibreOffice path. This option can be used instead of the path option in config/phppptxconfig.ini. |
outdir | string | Set the outdir path. Useful when the output path is not the same than the running script. |
'mspowerpoint' method options
Code samples
Example #1
Release notes
- phppptx 4.5:
- added "--norestore" to all conversions in the LibreOffice conversion plugin.
- new documentation in the macros-libreoffice folder to enable and use lossless compression without adding a macro.
- path and escapeshellarg options.
- PPT to PPTX, PPTX to PPT and PPT to PDF in the MS PowerPoint conversion plugin.
- phppptx 1.0:
- new method.