Skip to content

A bash script to convert PowerPoint (.pptx) presentations into: (1) A PDF of the entire presentation (2) Per-slide images (PNG or JPEG) (3) An optional ZIP archive of generated images

License

Notifications You must be signed in to change notification settings

PedroLopes/pptx-export-slides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pptx-export-slides: a powerpoint slides export tool (to PDF or PNG)

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

Installing

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 libreoffice

Automatic: 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.)


Basic Usage

./slides.sh --pptx FILE.pptx

This will generate:

  • FILE.pdf
  • png-output/FILE-*.png
  • FILE.zip

Command-Line Options

Required

Option Description


--pptx FILE Input PowerPoint file


General Options

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


Output Control

Option Description


--pdf-only Generate only the PDF --png-only Generate only images --no-zip Do not create ZIP archive


Image Options

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)


Examples

High-resolution PNGs (slides 2--6 only)

./slides.sh --pptx talk.pptx --dpi 300 --slides 2-6

JPEG images only, no ZIP

./slides.sh --pptx talk.pptx --format jpeg --png-only --no-zip

PDF only

./slides.sh --pptx talk.pptx --pdf-only

Output Files

Depending on options used, the script may produce:

  • NAME.pdf
  • OUTDIR/NAME-1.png, NAME-2.png, ...
  • NAME.zip

Notes

  • Slide numbering matches that of PowerPoint.
  • PNG and JPEG generation is handled by pdftoppm.

License

GNU GPL.

About

A bash script to convert PowerPoint (.pptx) presentations into: (1) A PDF of the entire presentation (2) Per-slide images (PNG or JPEG) (3) An optional ZIP archive of generated images

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages