Skip to content

Instantly share code, notes, and snippets.

@andeemarks
Created August 19, 2020 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andeemarks/1348332788704ee5cf44f490e6feaa52 to your computer and use it in GitHub Desktop.
Save andeemarks/1348332788704ee5cf44f490e6feaa52 to your computer and use it in GitHub Desktop.
Creating a single PDF containing the first slides from a series of presentations
// Convert each presentation to a PDF...
find . -ipath "*pptx" -exec libreoffice --impress --show --convert-to pdf {} \;
// Extract the first page from each PDF into a separate file...
find . -iname "*.pdf" -exec pdfseparate -l 1 {} {}-page%d.pdf \;
// Concat each PDF into a single document
find . -iname "*.pdf" -exec sh -c 'pdfunite "$@" cover-pages.pdf' sh {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment