Pdf2pptx
Convert your (Beamer) PDF slides to (Powerpoint) PPTX
Install / Use
/learn @ashafaei/Pdf2pptxREADME
pdf2pptx
Convert your (Beamer) PDF slides to (Powerpoint) PPTX
So you don't like using Powerpoint and would rather use Latex/Beamer to make your slides, however, you have a fancy Surface and you want to use the pen during the presentation? Here is my solution.
This script gets a PDF file as input and generates a Powerpoint PPTX file while preserving the format of the original PDF. Theoretically all PDF files, regardless of the original generator, can be converted to PPTX slides with this (not tested though).
Simply explained, I convert all the slides to high-quality image files first, and then push them into a Powerpoint project as a slide.
How to run
- Execute
./pdf2pptx.sh test.pdfto generate atest.pdf.pptxfile (replacetest.pdfwith your filename). - By default the output powerpoint project is in the widescreen mode. If your slides are not for widescreen you can alternatively run
./pdf2pptx.sh test.pdf notwideto generate a 4:3 standard PPTX project.
Dependencies
- You need
convertfrom ImageMagick zipandsed- (Optional)
perl,python, orrubyif you use a symlink to pdf2pptx.sh
If you're using Linux you probably already have all the above.
If you're using OSX you need to install ImageMagick and make sure convert is accessible from your Terminal.
If you're using Windows you can use Cygwin, but if you don't have it already, it is not recommended! If you're using Windows 10, you can easily set up Ubuntu bash (More Info), install ImageMagick and then use the script natively. Another solution for Windows users is to access a linux box (such as your university servers) to take care of the task.
New issues with ImageMagick
ImageMagick no longer allows PDF to image conversion. If you get the following error on the test example:
Doing test.pdf
convert: not authorized `test.pdf' @ error/constitute.c/ReadImage/412.
convert: no images defined `./test.pdf.temp/slide.png' @ error/convert.c/ConvertImageCommand/3210.
Error with extraction
in /etc/ImageMagick-6/policy.xml or /etc/ImageMagick/policy.xml, change:
<policy domain="coder" rights="none" pattern="PDF" />
to
<policy domain="coder" rights="read" pattern="PDF" />
Now it should work. Note that modifying the policy file would require root privileges. If you do not have root access on your machine, you can alternatively compile and use an older version of ImageMagick.
Acknowledgement
Thanks to Melissa O'Neill for providing a Pdf2Keynote tool for mac which has motivated this small project!
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
