What I learned turning HTML slides into editable PowerPoint files

by•

I make getdeck, a slide layout library (). The slides are HTML, and people need them in PowerPoint, so I built an export to .pptx. I also designed a self-contained .html export, which is not on the site yet. A few things I learned along the way:

1. Measure the slide, then rebuild it. The export renders each slide at a fixed 1920x1080, records where every element actually landed, and builds the .pptx from those coordinates. The UI that asks for an export never has to know about positions or styles.

2. Not everything can stay native. Text stays editable and charts become real PowerPoint shapes, but some decorations only survive if they are baked into an image. When I design a new layout now, "this part will become a picture" is a warning sign.

3. A round trip needs two fingerprints. In the HTML export design (not live yet), the file carries its coordinate data inside, so it could be edited and uploaded back. With a hash of that data alone, editing only the visible text would still match and the old text would go out. So the design checks the data and the visible content separately, and measures the slide again when either one changed.

4. A hash is not a signature. Anyone can recompute it, so a deliberately altered file passes. The only person that would hurt is the uploader, whose own file would come out wrong, so I left it for now. A server-side signed hash is the fix if that changes.

5. My reference is LibreOffice, not PowerPoint. I compare output against LibreOffice renders, which is good for catching regressions between runs but says little about how PowerPoint itself will draw the file.

Two questions for anyone who has built something like this:

How do you check PPTX output, and what do you use as the reference renderer?

Would you use a re-editable HTML file, or do you only ever want the .pptx?

4 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.