htmlpptx

The model hands you a web page.
PowerPoint gets objects.

MPGA rebuilds an HTML deck into a real .pptx: every heading, paragraph and shape becomes an ordinary object — selectable, editable, movable. Not a picture of a slide, but a slide.

in the browser · offline · your file never leaves it

Slide 2 · Classification
The main groups of network resources
Different kinds of resource solve different problems.
Websites
Multi-purpose systems with search and navigation
Libraries
Collections of documents and digitised editions
Databases
Structured record sets you can query
2
PPTX
<section class="slide">
<h2>The main groups of network resources</h2>
<div class="card">…</div>
<i data-lucide="globe">
</section>
HTML
01teardown

What happens to your slide

The engine does not photograph the page. It measures every element, decides which PowerPoint object it becomes, and builds the file from scratch.

deck.html
PPresentation.pptxready to edit
Slide 2 · Classification
The main groups of network resources
Different kinds of resource solve different problems.
Websites
Multi-purpose systems with search and navigation
Libraries
Collections of documents and digitised editions
Databases
Structured record sets you can query
2
00 / 1910 text box6 shape3 pictureMeasure

Drag the slider — or just watch

02compare

Screenshot versus objects

The two earlier scripts shot each slide as a PNG and dropped it in full-bleed. Pixel-perfect — and nothing left to edit. Drag the divider.

Slide 2 · Classification
The main groups of network resources
Different kinds of resource solve different problems.
Websites
Multi-purpose systems with search and navigation
Libraries
Collections of documents and digitised editions
Databases
Structured record sets you can query
2
Slide 2 · Classification
The main groups of network resources
Different kinds of resource solve different problems.
Websites
Multi-purpose systems with search and navigation
Libraries
Collections of documents and digitised editions
Databases
Structured record sets you can query
2
before: a picture · 1after: objects · 19

One object per slide. Text will not select, a typo cannot be fixed, a colour cannot be changed.

Nineteen objects instead of one: every heading is a text box, every card a shape with a fill.

03mapping

What turns into what

The mapping table is the engine. On the left, what the model writes; on the right, what PowerPoint opens.

  • h1 · h2 · p · b · small
    Text boxeditable

    Position comes from the ink box of the letters, not the element box.

  • div with background · border · border-radius
    Shapeeditable

    Fill, border and radius travel as values, not as pixels.

  • border-left on a callout
    Shape + bareditable

    A PPTX shape can only be bordered on all four sides, so the bar ships as its own object.

  • <i data-lucide="globe">
    Picture from the built-in setrasterised

    The icons live inside the tool: nothing to link, no internet needed.

  • <svg viewBox="0 0 900 290">
    Picture + native captionseditable

    Diagram artwork is rasterised with its text hidden; the captions are laid on top as objects.

  • [data-raster]
    Escape hatch: anything as a picturerasterised

    For artwork no set of shapes would reproduce safely. An honest price for the freedom.

04internals

What it cost

No number here is invented: every one of them is measurable on the built site.

11 KB
page over the wire

The engine is a separate file, fetched only when needed. A page left open quietly pulls it in while idle.

0
requests after load

Not a promise but a header: the page ships connect-src ‘none’. Kill your network and build a file — it takes a minute to check.

1160 × 652.5
slide contract, 16:9

The only box the engine treats as a slide. Anything around it — toolbars, navigation — never reaches the file.

1 file
runs off a disk

MPGA.html is the whole program in one file: download it, double-click, forget about the internet.

LibreOffice
result verification

Tests open the built .pptx, render it and compare against how the same deck looks in a browser.

MIT
open source

No sign-up, no subscription, no cap on how many decks you convert.

05lessons

The price of precision

Four things, each paid for with a rebuild. Together they explain why “just take a screenshot” is not an answer.

01
× 0.75 · × 10510.34

Two units, easily confused

Font size converts to points (72/96); shape coordinates convert to EMU. Correct shapes with mis-scaled text mean exactly one thing: the font size was multiplied by the wrong number.

02
Range.selectNodeContents(el)

The element box is not the letter box

getBoundingClientRect returns a border box, padding and slack included. The only way to hit the position that centring inside a card produces is the ink box of a selection range.

03
h > size × 1.6

Wrapping breaks short captions

“Преподаватель” came out as “Преподавател” plus a lone “ь” on the next line: Arial is a touch wider in PowerPoint than in Chromium. Wrapping is now enabled only for genuinely multi-line text.

04
text { visibility: hidden }

Diagrams: a picture without its captions

Diagram artwork cannot be rebuilt from shapes reliably. So the SVG is shot with its text hidden and the captions are placed on top as native objects — identical on screen, still editable.

Bring your own HTML

“Show an example” builds a deck in two clicks — no chat, no file of your own.

This page is about the project. The tool itself lives at mpga.kiviuly.ru and runs without a network.

A project by Artemiy Averyanov
Slide 1of 6en