transform

transform

ADVANCED / PREMIUM BASIC

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
extraOptions string Extra parameters to be used when doing the conversion.
homeFolder string Set a custom home folder to be used for the conversions.
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 1.0: new method.