Skip to content

Runtime environments ​

pptx-viewer splits into a DOM-free core engine and browser-only UI bindings. This page covers where each part runs, and behaviour that follows directly from the browser sandbox rather than from a missing feature.

Where it runs ​

EnvironmentWorksCaveats
BrowserYesThe full feature set: parsing, rendering, editing, export, collaboration.
Node.js (and serverless)Core onlypptx-viewer-core (load, edit, save, Markdown/SVG conversion, encryption) is DOM-free. The UI bindings, raster export (html2canvas), and EMF/WMF conversion are browser features.
Web WorkerCore onlySame scope as Node.js: the engine has no DOM dependency.

Platform notes ​

These are not gaps to be closed: they follow directly from running inside a browser's security sandbox, which cannot do what the desktop application can.

Fonts ​

A browser has no font catalogue of its own to draw on the way the desktop app does, so pptx-viewer resolves each deck font in three steps: use it as-is when the reader's machine has it installed, otherwise fetch its verified metric-compatible clone from Google Fonts before layout (Calibri -> Carlito, Cambria -> Caladea, Arial -> Arimo, Times New Roman -> Tinos, Courier New -> Cousine, Georgia -> Gelasio, so line breaks and text extents still match PowerPoint), and only when neither exists fall back through PANOSE classification to a same-class generic font, which can shift metrics.

While a deck loads, the viewer waits briefly (150 ms) for the Google Fonts faces its slides draw, so cached faces never appear in a stand-in first. A first download on a slow network does not hold the deck back: after 150 ms, or at once when the request fails (offline, blocked), the deck is shown with metric-compatible substitutes, the status bar reads "Downloading fonts (1 of 2)" while the download runs, and a late face is laid out again when it arrives. Installed and embedded fonts need no wait.

The Home font dropdown in all five bindings also lists supported Google Fonts weights, for example DM Sans Light, DM Sans Medium and DM Sans SemiBold. Regular keeps the plain family name; choosing a weight preserves that name on save. The bundled metadata does not invent faces for unknown, embedded or custom fonts. Hosts can opt into the same { family, weight } variants with buildFontCatalog({ includeWeightVariants: true }) from ooxml-ui/pptx/render/font-catalog, without importing the editor. The default catalogue output is unchanged. See the font-picker API table.

Fonts and privacy ​

Fetching a clone from Google Fonts means the reader's browser contacts fonts.googleapis.com and fonts.gstatic.com, which reveals the reader's IP address to Google. By default the reader decides with the File > Options > Trust Center option "Download fonts that are not installed or embedded (Google Fonts)", which is on. Turning it off applies at once to the open deck (the viewer removes its webfont stylesheet) and to every later load, and the choice is saved with the other options. A host can decide instead with the googleFonts option, available on every binding:

  • unset (the default): the Trust Center option decides; when it is on, clones are loaded from Google Fonts as described above;
  • googleFonts: false: no request goes to Google; text uses installed fonts, fonts embedded in the deck, or the PANOSE fallback, so line breaks can differ from PowerPoint. The Trust Center option is shown off and read-only;
  • googleFonts: { baseUrl: 'https://fonts.example.com/css2' }: the same CSS2 request goes to a self-hosted mirror instead, and the Trust Center option is shown on and read-only. The mirror must answer the Google Fonts CSS2 query format (?family=...&display=swap) with compatible @font-face CSS, and its font files should be self-hosted too so no request reaches Google. A baseUrl that is not an absolute http(s) URL turns the fallback off (the option is then shown off and read-only) and logs a warning.

The option also governs the WordArt glyph-outline fetch and the webfonts inlined into slide image exports, since both reuse the stylesheet URL the viewer resolved. Both read the CSS and font files with fetch(), so a mirror must send CORS headers (Access-Control-Allow-Origin) for them to work, as Google's own servers do.

How the viewer picks a face for each run, and how it waits for downloads, is described in font loading. Every request the packages can make is listed in PRIVACY.md.

External content and privacy ​

A deck can link pictures (including picture fills and picture bullets), videos, audio, poster frames and the sounds that play with animations, transitions and hyperlinks to other servers (TargetMode="External" relationships) instead of embedding them. Fetching them tells whoever runs that server the reader's IP address and that the deck was opened. As in Microsoft PowerPoint, the viewer fetches none of them when a deck opens: a security bar under the ribbon says "References to external pictures and other media have been blocked" and offers Enable Content, which then draws them. Nothing reopens: edits, saved or not, the slide on screen and undo history are kept. The choice lasts until another presentation is opened and is not stored. PowerPoint's own default records the sources. The Trust Center option "Allow external content" (off by default) fetches without asking. A host can decide instead with the allowExternalContent option, available on every binding:

  • unset (the default): blocked, with the security bar, unless the reader turned the Trust Center option on;
  • allowExternalContent: false: no linked content is fetched and no bar is shown, so slides show embedded content only, and the Trust Center option is shown off and read-only;
  • allowExternalContent: true: linked content is fetched without asking (like PowerPoint's "Unblock automatic download of linked images" policy), and the option is shown on and read-only.

The value applies to every deck the viewer opens, including decks opened for Compare and slides reused from another file; a change applies at once, without reloading the deck. Hyperlinks are not affected: they open only when the reader follows them. Fonts are separate: deck fonts that are neither installed nor embedded load from Google Fonts unless the Trust Center option "Download fonts that are not installed or embedded" or the googleFonts option turns that off (see Fonts and privacy).

In a collaboration session the linked addresses are part of the shared deck, but each participant's viewer decides for itself what to fetch: every participant sees the security bar and chooses Enable Content on their own, and one participant's choice never makes another's browser contact the linked server. allowExternalContent applies to each viewer in the same way.

Load limits ​

A host that opens decks it does not trust (uploads from the public, attachments) can bound the work one deck may cause with the limits option, available on every binding and passed straight to PptxHandler.load:

FieldDefaultBounds
maxInputBytesno limitThe file as given to the viewer, checked before it is opened.
maxUncompressedBytes500 MiBThe archive once inflated, checked from the declared sizes and again while each part is read.
maxEntries65,536The parts (ZIP entries) in the archive; 65,536 is also the highest value accepted.
maxSlidesno limitThe slides listed in ppt/presentation.xml, checked before any slide is parsed.
maxShapesno limitThe elements authored on the slides (group members included), counted as each slide is parsed.

Unset, or a field left out, keeps the default, so a viewer without limits behaves as before. A deck over a limit stops loading at that check and the viewer shows its load-error screen with a localized message that names the limit and the deck's value, for example "This presentation has 120 slides, more than the 100 this viewer accepts." A value that is not a positive finite number is rejected as an error rather than ignored. The limits apply to the deck the viewer opens (the content / source deck and File > Open), not to a file the user picks for Compare or Reuse Slides; a change applies from the next load. Without the viewer, pass the same object as handler.load(buffer, { limits }) (see Load options).

Run program actions (ppaction://program) ​

PowerPoint's "Run program" action setting is parsed and round-tripped losslessly (the authored program path/command survives load and save unchanged), and the Action Settings dialog lets you view and edit it like any other action while editing. What a browser cannot do is what PowerPoint itself does when the action fires during a show: launch a local executable. No web platform API exists for that, by design (a page that could launch arbitrary local programs would be a critical security hole).

Instead, clicking a Run-Program shape during a running show shows a non-blocking notice naming the exact resolved command (the path and whatever arguments the author typed - OOXML stores them as one opaque string, there is nothing to split) with a one-click Copy button, so the presenter can see what PowerPoint would have run and launch it themselves outside the browser if they choose. The click still counts as handled (the show does not also advance), matching every other action type. Implemented once as a shared decision function (src/ui/src/pptx/render/presentation-action.ts's runProgram intent, plus src/ui/src/pptx/render/run-program-notice.ts), consumed identically by all five bindings, with e2e/pptx/run-program-notice.spec.ts exercising the notice, the Copy button, and click-consumption against all five demos.

Two real bugs surfaced and were fixed while building this: React initially rendered the notice as a sibling of the element the running show calls requestFullscreen() on, and a real OS-level fullscreen element's top layer paints above everything outside it regardless of CSS z-index, so the Copy button was visible but not clickable; it now renders through the show stage's own overlay slot, alongside the other show-only chrome. Separately, a target string that is not URI-shaped (a typed path like notepad.exe C:\temp\notes.txt) was not being recognised as an external relationship target on save, so the written package failed TargetMode="External" validation for ppaction://program, hlinkfile, and hlinkpres alike; the save path now forces External for all three.

Media playback ​

Audio and video playback depends on the browser's own codec support: WMV and other legacy codecs may not play, and DRM-protected media will not play. This is a platform fact, not a missing feature: pptx-viewer hands playback to the browser's native media element, and a browser only decodes what it ships a codec for.

Released under the Apache-2.0 License.