Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

modern-openxml

qq15725486MIT0.1.20-patch.1TypeScript support: included

OpenXML for JavaScript

OpenXML, typescript, OPC, pptx, xlsx, docx

readme

modern-openxml

Minzip Version Downloads Issues License

PPTX to JSON

import { pptxToIDoc } from 'modern-openxml'
import presetShapeDefinitions from 'modern-openxml/presetShapeDefinitions'

fetch('./example.pptx')
  .then(rep => rep.arrayBuffer())
  .then(async buffer => {
    const pptx = await pptxToIDoc(new Uint8Array(buffer), { presetShapeDefinitions })
    console.log(pptx)
  })

PPTX to SVG

import { pptxToSVG } from 'modern-openxml'
import presetShapeDefinitions from 'modern-openxml/presetShapeDefinitions'

fetch('./example.pptx')
  .then(rep => rep.arrayBuffer())
  .then(async buffer => {
    const pptxSVG = await pptxToSVG(new Uint8Array(buffer), { presetShapeDefinitions })
    console.log(pptxSVG)
    document.body.appendChild(pptxSVG)
  })

changelog

0.1.20-patch.1 (2025-05-29)

Bug Fixes

0.1.20 (2025-04-21)

Bug Fixes

0.1.19 (2025-04-21)

Bug Fixes

0.1.18 (2025-04-21)

Bug Fixes

Features

  • SlideElement to SVG onViewBox (913c32c)

0.1.17 (2025-04-17)

Bug Fixes

0.1.16 (2025-04-17)

Bug Fixes

  • svg slideElement viewBox (326c932)

0.1.15 (2025-04-17)

Bug Fixes

  • svg slideElement viewBox (19d6cef)

Features

0.1.14 (2025-04-15)

Features

  • SVG add srcRect util attr (2af0e05)

0.1.13 (2025-04-15)

Features

  • SVG add srcRect util attr (7dfcc22)

0.1.12 (2025-04-14)

Features

0.1.11 (2025-04-12)

Bug Fixes

0.1.10 (2025-04-12)

Bug Fixes

  • parse fontFamily +mn-xx +mj-xx (bf7d985)

0.1.9 (2025-04-11)

Features

0.1.8 (2025-04-10)

Features

0.1.7 (2025-04-10)

Bug Fixes

Features

0.1.6 (2025-04-09)

Features

0.1.5 (2025-04-09)

Features

0.1.4 (2025-04-08)

Features

  • supports more decodeing source (7633877)

0.1.3 (2025-04-08)

Bug Fixes

0.1.2 (2025-04-08)

Bug Fixes

0.1.1 (2025-04-07)

0.1.0 (2025-04-07)

Bug Fixes

Features

0.0.6 (2025-01-09)

Features

0.0.5 (2025-01-08)

Features

0.0.4 (2025-01-07)

Features

0.0.3 (2024-12-30)

Features

0.0.2 (2024-12-20)

Bug Fixes

  • parse geometry by SVGRenderer (6bfb57f)

Features

  • add image prop to PictureJSON (932ff31)
  • export placeholderShape prop in SlideElementJSON (be9f412)
  • parse background in SlideElement (d4eb7fe)
  • parse slide background (dc3d4a0)
  • PPTXToSVGRenderer (6f889c5)

0.0.1 (2024-12-19)

Bug Fixes

Features