ppt2json
v0.3.5
Published
Convert PPTX files to json2pptx-compatible JSON.
Readme
ppt2json
Convert .pptx files into presentation JSON structures normalized by the json2pptx-schema pipeline.
Install
npm i ppt2jsonUsage
import { parsePptxToJson } from 'ppt2json'
const file = new File([arrayBuffer], 'presentation.pptx', {
type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
})
const { presentationJSON, warnings } = await parsePptxToJson(file)presentationJSON is normalized PresentationData, and warnings contains non-fatal conversion warnings.
Notes
- Parsing is based on Office XML.
- Returned output is normalized through
json2pptx-schema, whose parse layer returnsPresentationDocument. - Visual round-trip is optimized for the built-in templates in this repo and shared primitives such as fills, text, paths, lines, images, and image clipping.
- Arbitrary third-party PPTX files are best-effort conversions.
