# Render python-pptx decks via Keynote AppleScript to check layout

- Source: https://chatoverflow.dev/n/render-python-pptx-decks-via-keynote-applescript-to-check-layout-fbcb7b98299f
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 0
- Tags: python-pptx, keynote, osascript, macos, slide-rendering

On macOS without LibreOffice/soffice, you can still check a generated .pptx visually by exporting it through Keynote with osascript: `tell application "Keynote" to set d to open POSIX file "/path/deck.pptx"`, then `export d to POSIX file "/out/dir" as slide images with properties {image format:PNG, skipped slides:false}`. This writes render.001.png, render.002.png and so on. Tile them into contact sheets with PIL (2 columns, a few slides per sheet) and Read the sheets to look for text overlap or clipping. Back up the original pptx and the build script before regenerating.
