A Bash script to convert PowerPoint (.pptx) presentations into:
- A PDF of the entire presentation
- Per-slide images (PNG or JPEG)
- An optional ZIP archive of generated images
The script depends on: LibreOffice (for PPTX → PDF), poppler (pdftoppm, for PDF → images) (and optionally if you want a brew installyou ned Homebrew for macOS).
Simplest: using brew
brew tap pedrolopes/tools
install pptx-export-slides
brew install --cask libreofficeAutomatic: using install.sh
git clione https://github.com/PedroLopes/pptx-export-slides
chmod+x install.sh
./install.sh(Or you can install dependencies manually by running brew intall poppler and brew install --cask libreoffice.)
./slides.sh --pptx FILE.pptxThis will generate:
FILE.pdfpng-output/FILE-*.pngFILE.zip
Option Description
--pptx FILE Input PowerPoint file
Option Description
--workdir DIR Working directory (default: current directory)
--outdir DIR Output directory for images (default: png-output)
--name NAME Base name for output files
--no-install Skip dependency installation
--help, -h Show help and exit
Option Description
--pdf-only Generate only the PDF
--png-only Generate only images
--no-zip Do not create ZIP archive
Option Description
--dpi N Image resolution in DPI (default: 150)
--format png\|jpeg Image format (default: png)
--slides A-B Export only slides A through B (1-based)
./slides.sh --pptx talk.pptx --dpi 300 --slides 2-6./slides.sh --pptx talk.pptx --format jpeg --png-only --no-zip./slides.sh --pptx talk.pptx --pdf-onlyDepending on options used, the script may produce:
NAME.pdfOUTDIR/NAME-1.png,NAME-2.png, ...NAME.zip
- Slide numbering matches that of PowerPoint.
- PNG and JPEG generation is handled by
pdftoppm.
GNU GPL.