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

Package detail

modern-openxml

qq15725322MIT1.10.1TypeScript support: included

OpenXML for JavaScript

OpenXML, typescript, OPC, pptx, xlsx, docx

readme

modern-openxml

Minzip Version Downloads Issues License

📦 Install

npm i modern-openxml

Methods

preset shape definitions

preset text warp definitions

PPTX to IDoc

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

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

PPTX to SVG

Needs modern-idoc-svg

npm i modern-idoc-svg
import { docToSvg } from 'modern-idoc-svg'
import { pptxToDoc } from 'modern-openxml'
import presetShapeDefinitions from 'modern-openxml/presetShapeDefinitions'

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

changelog

1.10.1 (2025-12-12)

Features

1.10.0 (2025-11-03)

Features

  • rename idocToPptx to docToPptx (01257f3)

1.9.0 (2025-10-09)

Features

1.8.3 (2025-09-28)

Bug Fixes

  • exports for package.json (bb5f6df)
  • typesVersions for package.json (0ba1eeb)

1.8.2 (2025-09-17)

Features

1.8.1 (2025-09-13)

1.8.0 (2025-09-11)

Bug Fixes

  • slideWidth / slideHeight (5dc417a)

Features

1.7.0 (2025-08-25)

Bug Fixes

Features

1.6.4 (2025-08-12)

Bug Fixes

1.6.3 (2025-08-11)

Bug Fixes

1.6.2 (2025-08-11)

Bug Fixes

1.6.1 (2025-08-11)

Bug Fixes

1.6.0 (2025-08-11)

Features

1.5.5 (2025-07-30)

Features

  • outline lineCap lineJoin (2ed35b7)

1.5.4 (2025-07-14)

Bug Fixes

1.5.3 (2025-07-14)

Bug Fixes

1.5.2 (2025-07-14)

Bug Fixes

1.5.1 (2025-07-14)

Bug Fixes

Features

1.5.0 (2025-07-10)

Features

1.4.0 (2025-07-08)

Features

1.3.2 (2025-06-28)

Bug Fixes

1.3.1 (2025-06-28)

Bug Fixes

1.3.0 (2025-06-26)

Bug Fixes

Features

  • rename xxxSVG to xxxSvg and xxxPPTX to xxxPptx etc (cb6a4f6)

1.2.3 (2025-06-25)

Features

1.2.2 (2025-06-25)

Features

  • parsePresetTextWarpDefinitions (e870ac8)

1.2.1 (2025-06-25)

Bug Fixes

1.2.0 (2025-06-25)

Features

  • add parseAdjustValues / change methods name (11a8627)

1.1.4 (2025-06-24)

Bug Fixes

Features

  • parsePresetShapeDefinitions (eb39cd1)
  • parsePresetShapeDefinitions (3c1db44)
  • parsePresetShapeDefinitions (26470fd)
  • parsePresetShapeDefinitions (1795f82)
  • parsePresetShapeDefinitions (ffdc8cd)

1.1.3 (2025-06-12)

Bug Fixes

1.1.2 (2025-06-12)

Bug Fixes

Features

1.1.1 (2025-05-23)

Features

1.1.0 (2025-05-22)

Features

1.0.3 (2025-05-20)

1.0.2 (2025-05-20)

Features

  • parse color fixed to rgba (d94d6f3)

1.0.1 (2025-05-19)

Features

  • add themeId to slide.meta / add coreProps parse to pptx.meta (bc0d567)

1.0.0 (2025-05-14)

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