npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@briank-dev/pptx2html-turbo

v2.1.0

Published

Convert PPTX slides to high-fidelity HTML in the browser — pure Rust/WASM, zero dependencies

Readme

npm Rust WebAssembly License

English · 한국어

Convert PowerPoint decks to HTML entirely in the browser. The renderer is a from-scratch ECMA-376 implementation written in Rust and compiled to WebAssembly — no server round trip, no upload, no PowerPoint or LibreOffice install. The file never leaves the tab.

Anything the renderer cannot resolve exactly is reported as a coded diagnostic rather than silently dropped or replaced with a guess.

Try the live demo — drop a .pptx and watch it convert.

Install

npm install @briank-dev/pptx-to-html

Usage

The convenience API initializes WASM on first use and accepts a browser File/Blob, ArrayBuffer, or Uint8Array. Inputs larger than 64 MiB are rejected before conversion.

<iframe id="output" sandbox="allow-scripts" title="Converted slide output"></iframe>
<script type="module">
import { pptxToHtml } from '@briank-dev/pptx-to-html';

const html = await pptxToHtml(file);
document.getElementById('output').srcdoc = html;
</script>

Security: converted output is active, untrusted HTML. Render it in a sandboxed iframe with allow-scripts and without allow-same-origin, as shown above.

<script type="module">
import init, {
  convert,
  convert_with_options,
  convert_with_metadata,
  convert_with_options_metadata,
  get_presentation_info,
} from '@briank-dev/pptx-to-html';

await init();

const response = await fetch('/presentation.pptx');
const data = new Uint8Array(await response.arrayBuffer());

const html = convert(data);

const filtered = convert_with_options(
  data,
  true,
  false,
  new Uint32Array([1, 3]),
  1.0,
);

const info = get_presentation_info(data);
console.log(info.slideCount, info.widthPx, info.heightPx, info.title);

const withMetadata = convert_with_metadata(data);
console.log(JSON.parse(withMetadata.diagnostics));
console.log(withMetadata.unresolvedElements);

const filteredWithMetadata = convert_with_options_metadata(
  data,
  true,
  false,
  new Uint32Array([1, 3]),
  1.0,
);
</script>

API

  • pptxToHtml(input, moduleOrPath?) — lazily initialize WASM and convert browser or byte input; concurrent calls share the first initialization attempt and its success or failure, while a later call retries after failure
  • init() — initialize the WASM module
  • convert(data) — convert PPTX bytes to HTML
  • convert_with_options(data, embedImages, includeHidden, slideIndices, scale)
  • convert_with_metadata(data) — convert and return canonical diagnostics JSON plus unresolved-element metadata
  • convert_with_options_metadata(data, embedImages, includeHidden, slideIndices, scale)
  • get_presentation_info(data) — typed presentation metadata
  • get_info(data) / get_slide_count(data) — backward-compatible helpers

Metadata results expose diagnostics (canonical ordered JSON), diagnosticsJson, and the backward-compatible unresolvedElements JSON.

Slide indexing

  • convert_slides(data, slides) uses 0-based slide indices.
  • convert_with_options(..., slideIndices) and convert_with_options_metadata(..., slideIndices) use 1-based slide indices.

Slide scale

  • scale is required; pass 1.0 for the original slide size.
  • Values like 2.0 enlarge the whole slide canvas uniformly without recomputing coordinates or reflowing text.
  • The included browser demo displays ordered diagnostics, executes renderer-owned actions and timing in an opaque-origin frame, and initializes image-like zoom to the available width.

Scope

This npm package is the browser ESM/WASM distribution and converts PPTX only. The parent project additionally converts DOCX, DOC, XLSX, XLS, PPT, and PDF, but those formats require a native pipeline backed by installed LibreOffice and Poppler executables and are not available in browser WASM. See Universal document conversion.

@briank-dev/pptx2html-turbo is the legacy package name. It remains available with the same API and release versions during migration.

Project

  • Repository: https://github.com/brnyxx/pptx2html-turbo
  • Issues: https://github.com/brnyxx/pptx2html-turbo/issues
  • Demo: https://brnyxx.github.io/pptx2html-turbo/
  • License: MIT