Skip to content
프로젝트

소개

Office PowerPoint(.pptx) 파일을 읽기 쉬운 JSON 데이터로 변환합니다.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Browser-side parsing: Read .pptx files directly in the browser, making it suitable for handling local user files without uploading them to a server for conversion.
  • Readable JSON output: Organize results by slides, elements, assets, themes, and related structures instead of exposing raw Office XML as low-level objects.
  • Built for secondary processing: Compared with simply converting PPTX to HTML, pptxtojson focuses more on data readability and programmability, making it easier to plug into downstream workflows.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

🎨 pptxtojson

npm-version npm download GitHub issues license GitHub stars GitHub forks

简体中文 | English

pptxtojson is a browser-first PPTX parser that converts .pptx files into clean, readable, structured JSON.

Live demo: https://pipipi-pikachu.github.io/pptxtojson/

China mirrors, regularly synced: Gitee, GitCode

✨ Core Capabilities

  • Browser-side parsing: Read .pptx files directly in the browser, making it suitable for handling local user files without uploading them to a server for conversion.
  • Readable JSON output: Organize results by slides, elements, assets, themes, and related structures instead of exposing raw Office XML as low-level objects.
  • Built for secondary processing: Compared with simply converting PPTX to HTML, pptxtojson focuses more on data readability and programmability, making it easier to plug into downstream workflows.

🚀 Use Cases

  • Web editor import: Convert PPTX slides and elements into an editable data model, such as PPTist.
  • Content extraction: Extract text, speaker notes, media assets, and other information for search, archiving, review, or data analysis.
  • AI document understanding: Turn presentation content into structured input for summarization, question answering, knowledge-base ingestion, and similar workflows.
  • Custom rendering: Build your own preview, thumbnails, editing canvas, or conversion pipeline from the JSON result.

🔨 Installation

npm install pptxtojson

💿 Usage

<input type="file" accept=".pptx">
import { parse } from 'pptxtojson'

document.querySelector('input').addEventListener('change', evt => {
	const file = evt.target.files[0]

	const reader = new FileReader()
	reader.onload = async e => {
		const json = await parse(e.target.result, {
			imageMode: 'base64',
			videoMode: 'none',
			audioMode: 'none',
		})
		console.log(json)
	}
	reader.readAsArrayBuffer(file)
})

For browser parsing, resource cleanup, Node.js, and TypeScript examples, see the user guide.

🎯 Notes

The current parsing result can achieve roughly 85%+ overall fidelity in layout and styling compared with the source file. For PPTX files manually created and edited from scratch by ordinary users, common page structures and basic styles can even reach 95%+ fidelity.

However, if the file comes from a complex online template, or if it was created by a highly skilled PowerPoint user with many "advanced techniques" such as complex masters, deeply nested groups, special shape effects, complex gradients, non-standard shapes, or complex SmartArt, the parsing difficulty increases significantly and the fidelity will decrease accordingly. These files are better treated as complex samples for separate evaluation.

📕 User Documentation

See the user guide for the full API, output fields, units, data examples, rendering considerations, and migration notes.

TypeScript definitions: types/index.d.ts.

🙏 Acknowledgements

pptxtojson refers heavily to the implementations of PPTX2HTML and PPTXjs.

Unlike those projects, pptxtojson does not aim to convert PPT files into HTML pages. Instead, it outputs clean, readable JSON that is easier to process further, and it includes many optimizations and additions to improve the completeness and accuracy of extracted information.

Issues and PRs with more PPTX samples, parsing scenarios, and improvement suggestions are welcome.

📄 License

MIT License | Copyright © 2020-PRESENT pipipi-pikachu

관련 프로젝트 살펴보기

불러오는 중…