Skip to content

API reference ​

Each entry point, by the specifier you import it from.

  • pptx-ts: The runtime-agnostic authoring entry, which the bare pptx-ts specifier resolves to when neither the node nor the browser export condition applies.
  • pptx-ts/inspect: A cheap, flat snapshot of what a .pptx contains: every element on every slide, with its slide-absolute box and the handful of text/fill properties a layout audit asks about.
  • pptx-ts/measure: The calibrated text-measurement engine as a standalone, public surface, so a consumer can lay out its own geometry (grow a card, reflow a grid, detect overflow) before export without a TsPptx instance.
  • pptx-ts/read: Open an existing .pptx, inspect its OPC structure, and save it back with untouched parts byte-identical (lossless round-trip).
  • pptx-ts/script: Turn an existing .pptx into a description of the write-API calls that would rebuild it.
  • pptx-ts/math: Author display equations in LaTeX or MathML and get OMML for the math: option on addText (see TextProps.math).
  • pptx-ts/zip: Read and write zip archives on the backend the package itself uses: readZip unpacks a .pptx (or any zip) to a map of paths to bytes, and ZipWriter builds one.
  • pptx-ts/html: Reproduce an existing HTML <table> as a PowerPoint table, as a free function that works anywhere there is a DOM.
  • pptx-ts/node: The Node authoring entry, which the bare pptx-ts specifier resolves to under the node export condition.
  • pptx-ts/browser: The browser authoring entry, which the bare pptx-ts specifier resolves to under the browser export condition.