convertPresentation

March 28, 2026 ยท View on GitHub

Convert presentation files between popular formats using LibreOffice.

Usage

openGyver convertPresentation <input-file> [flags]

Prerequisites

LibreOffice must be installed (specifically the soffice command-line tool).

PlatformInstall Command
macOSbrew install --cask libreoffice
Linuxapt install libreoffice
Windowslibreoffice.org/download

Arguments

ArgumentRequiredDescription
input-fileYesPath to the input presentation file

Flags

FlagShortTypeDefaultDescription
--output-ostring""Output file path (required)
--help-hboolfalseShow help for convertPresentation

Supported Formats

Input Formats (10)

FormatDescription
DPSWPS Presentation
KEYApple Keynote
ODPOpenDocument Presentation
POTPowerPoint Template (legacy)
POTXPowerPoint Template
PPSPowerPoint Show (legacy)
PPSXPowerPoint Show
PPTPowerPoint (legacy)
PPTMPowerPoint with Macros
PPTXPowerPoint

Output Formats (8)

FormatDescription
ODPOpenDocument Presentation
PDFPortable Document Format
PPTXPowerPoint
PPTPowerPoint (legacy)
HTMLWeb page
PNGImage (one per slide)
JPGImage (one per slide)
SVGScalable Vector Graphics

Examples

# Convert PowerPoint to PDF
openGyver convertPresentation slides.pptx -o slides.pdf

# Convert PowerPoint to OpenDocument
openGyver convertPresentation slides.pptx -o slides.odp

# Convert Keynote to PowerPoint
openGyver convertPresentation slides.key -o slides.pptx

# Convert PowerPoint to HTML
openGyver convertPresentation slides.pptx -o slides.html

# Upgrade legacy PPT to modern PPTX
openGyver convertPresentation old.ppt -o new.pptx

# Export slides as images
openGyver convertPresentation slides.pptx -o slides.png

# Export slides as SVG
openGyver convertPresentation slides.pptx -o slides.svg

# Convert a PowerPoint template to PDF
openGyver convertPresentation template.potx -o template.pdf

# Convert PowerPoint show to editable format
openGyver convertPresentation show.ppsx -o editable.pptx

# Convert ODP to PDF for distribution
openGyver convertPresentation presentation.odp -o presentation.pdf

# Convert macro-enabled presentation to standard format
openGyver convertPresentation macros.pptm -o clean.pptx

Notes

  • The conversion is performed by LibreOffice in headless mode (soffice --headless).
  • LibreOffice outputs files to the output directory with the same base name as the input. If your specified output filename differs, the file is automatically renamed.
  • The input format is also validated against the supported formats list, though LibreOffice itself handles the actual format detection.
  • Image output (PNG, JPG) may produce one file per slide depending on the LibreOffice version.
  • Keynote (.key) support depends on the LibreOffice version; newer versions have better compatibility.
  • The POTM and PPSM formats are also accepted as input (present in the source code's supported formats map).