pptxtojson 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,335 +1,352 @@
1
- # 🎨 pptxtojson
2
-
3
- [![npm-version](https://img.shields.io/npm/v/pptxtojson)](https://www.npmjs.com/package/pptxtojson)
4
- [![npm download](https://img.shields.io/npm/dm/pptxtojson)](https://www.npmjs.com/package/pptxtojson)
5
- [![GitHub issues](https://img.shields.io/github/issues-closed/pipipi-pikachu/pptxtojson)](https://github.com/pipipi-pikachu/pptxtojson/issues)
6
- [![license](https://img.shields.io/github/license/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/blob/master/LICENSE)
7
- [![GitHub stars](https://img.shields.io/github/stars/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/stargazers)
8
- [![GitHub forks](https://img.shields.io/github/forks/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/network/members)
9
-
10
- 一个运行在浏览器中,可以将 .pptx 文件转为可读的 JSON 数据的 JavaScript 库。
11
-
12
- > 与其他的pptx文件解析工具的最大区别在于:
13
- > 1. 直接运行在浏览器端;
14
- > 2. 解析结果是**可读**的 JSON 数据,而不仅仅是把 XML 文件内容原样翻译成难以理解的 JSON。
15
-
16
- 在线DEMO:https://pipipi-pikachu.github.io/pptxtojson/
17
-
18
- > 国内镜像(定期同步):[Gitee](https://gitee.com/pptist/pptxtojson)、[GitCode](https://gitcode.com/pipipi-pikachu/pptxtojson)
19
-
20
- # 🎯 注意事项
21
- ### ⚒️ 使用场景
22
- 本仓库诞生于项目 [PPTist](https://github.com/pipipi-pikachu/PPTist) ,希望为其“导入 .pptx 文件功能”提供一个参考示例。不过就目前来说,解析出来的PPT信息与源文件在样式上还是存在差异。
23
-
24
- 但如果你只是需要提取PPT文件的文本内容、媒体资源信息、结构信息等,或者对排版/样式精准度没有特别高的要求,那么 pptxtojson 可能会对你有帮助。
25
-
26
- ### 📏 长度值单位
27
- 输出的JSON中,所有数值长度值单位都为`pt`(point)
28
-
29
- # 🔨安装
30
- ```
31
- npm install pptxtojson
32
- ```
33
-
34
- # 💿用法
35
- ```javascript
36
- parse(file, options = {})
37
- ```
38
-
39
- ### 浏览器示例
40
- ```html
41
- <input type="file" accept="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
42
- ```
43
-
44
- ```javascript
45
- import { parse } from 'pptxtojson'
46
-
47
- document.querySelector('input').addEventListener('change', evt => {
48
- const file = evt.target.files[0]
49
-
50
- const reader = new FileReader()
51
- reader.onload = async e => {
52
- const json = await parse(e.target.result, {
53
- imageMode: 'base64',
54
- videoMode: 'none',
55
- audioMode: 'none',
56
- })
57
- console.log(json)
58
- }
59
- reader.readAsArrayBuffer(file)
60
- })
61
- ```
62
-
63
- ### Node.js 示例(实验性,1.5.0以上版本)
64
- ```javascript
65
- const pptxtojson = require('pptxtojson/dist/index.cjs')
66
- const fs = require('fs')
67
-
68
- async function func() {
69
- const buffer = fs.readFileSync('test.pptx')
70
-
71
- const json = await pptxtojson.parse(buffer.buffer, {
72
- imageMode: 'base64',
73
- videoMode: 'none',
74
- audioMode: 'none',
75
- })
76
- console.log(json)
77
- }
78
-
79
- func()
80
- ```
81
-
82
- ### 输出示例
83
- ```javascript
84
- {
85
- "slides": [
86
- {
87
- "fill": {
88
- "type": "color",
89
- "value": "#FF0000"
90
- },
91
- "elements": [
92
- {
93
- "left": 0,
94
- "top": 0,
95
- "width": 72,
96
- "height": 72,
97
- "borderColor": "#1F4E79",
98
- "borderWidth": 1,
99
- "borderType": "solid",
100
- "borderStrokeDasharray": 0,
101
- "fill": {
102
- "type": "color",
103
- "value": "#FF0000"
104
- },
105
- "content": "<p style=\"text-align: center;\"><span style=\"font-size: 18pt;font-family: Calibri;\">TEST</span></p>",
106
- "isFlipV": false,
107
- "isFlipH": false,
108
- "rotate": 0,
109
- "vAlign": "mid",
110
- "name": "矩形 1",
111
- "type": "shape",
112
- "shapType": "rect"
113
- },
114
- // more...
115
- ],
116
- "layoutElements": [
117
- // more...
118
- ],
119
- "note": "演讲者备注内容..."
120
- },
121
- // more...
122
- ],
123
- "themeColors": ['#4472C4', '#ED7D31', '#A5A5A5', '#FFC000', '#5B9BD5', '#70AD47'],
124
- "size": {
125
- "width": 960,
126
- "height": 540
127
- }
128
- }
129
- ```
130
-
131
- # 🎲 Options 配置说明
132
- > options 为可选参数,不传时使用默认配置。
133
-
134
- - `imageMode`:控制图片资源的解析方式,可选值为 `base64`、`blob`、`both`、`none`,默认值为 `base64`。
135
- - `base64` 表示仅解析 `base64`。
136
- - `blob` 表示仅解析 `blob`。
137
- - `both` 表示同时解析 `base64` `blob`。
138
- - `none` 表示不解析图片内容。
139
-
140
- - `videoMode`:控制视频资源的解析方式,可选值为 `blob`、`none`,默认值为 `none`。
141
- - `blob` 表示解析视频 `blob`。
142
- - `none` 表示不解析视频内容。
143
-
144
- - `audioMode`:控制音频资源的解析方式,可选值为 `blob`、`none`,默认值为 `none`。
145
- - `blob` 表示解析音频 `blob`。
146
- - `none` 表示不解析音频内容。
147
-
148
- # 🕰️ 旧版本说明
149
- - 在0.x版本中,所有输出的长度值单位都是px(像素)
150
- - 在1.x及以下版本:
151
- - 图片元素使用 `src` 字段返回 base64 数据;
152
- - 图片填充仅返回 `picBase64`;
153
- - 视频元素可能返回 `blob` 或 `src`;
154
- - 音频元素仅返回 `blob`;
155
- - 公式图片仅返回 `picBase64`;
156
-
157
- # 📕 解析属性
158
-
159
- - 幻灯片主题色 `themeColors`
160
-
161
- - 内置字体清单 `usedFonts`
162
-
163
- - 幻灯片尺寸 `size`
164
- - 宽度 `width`
165
- - 高度 `height`
166
-
167
- - 幻灯片页面 `slides`
168
-
169
- - 页面备注 `note`
170
-
171
- - 页面背景填充(颜色、图片、渐变、图案) `fill`
172
- - 纯色填充 `type='color'`
173
- - 图片填充 `type='image'`
174
- - 渐变填充 `type='gradient'`
175
- - 图案填充 `type='pattern'`
176
-
177
- - 页面切换动画 `transition`
178
- - 类型 `type`
179
- - 持续时间 `duration`
180
- - 方向 `direction`
181
-
182
- - 页面内元素 `elements` / 母版元素 `layoutElements`
183
- - 文字
184
- - 类型 `type='text'`
185
- - 水平坐标 `left`
186
- - 垂直坐标 `top`
187
- - 宽度 `width`
188
- - 高度 `height`
189
- - 边框颜色 `borderColor`
190
- - 边框宽度 `borderWidth`
191
- - 边框类型(实线、点线、虚线) `borderType`
192
- - 非实线边框样式 `borderStrokeDasharray`
193
- - 阴影 `shadow`
194
- - 填充(颜色、图片、渐变、图案) `fill`
195
- - 内容文字(HTML富文本:字体、字号、颜色、渐变、下划线、删除线、斜体、加粗、阴影、角标、超链接) `content`
196
- - 垂直翻转 `isFlipV`
197
- - 水平翻转 `isFlipH`
198
- - 旋转角度 `rotate`
199
- - 垂直对齐方向 `vAlign`
200
- - 是否为竖向文本 `isVertical`
201
- - 元素名 `name`
202
- - 自动调整大小 `autoFit`
203
- - 类型 `type`
204
- - `shape`:文本框高度会根据文本内容自动调整
205
- - `text`:文本框大小固定,字号会自动缩放以适应文本框(注:autoFit不存在时,也会固定文本框大小,但字号不会缩放)
206
- - 字体缩放比例(type='text'专有,默认为1) `fontScale`
207
- - 文本内边距(4边) `textInset`
208
- - 超链接 `link`
209
-
210
- - 图片
211
- - 类型 `type='image'`
212
- - 水平坐标 `left`
213
- - 垂直坐标 `top`
214
- - 宽度 `width`
215
- - 高度 `height`
216
- - 边框颜色 `borderColor`
217
- - 边框宽度 `borderWidth`
218
- - 边框类型(实线、点线、虚线) `borderType`
219
- - 非实线边框样式 `borderStrokeDasharray`
220
- - 裁剪形状 `geom`
221
- - 裁剪范围 `rect`
222
- - 资源引用路径 `ref`
223
- - 图片base64 `base64`
224
- - 图片blob `blob`
225
- - 旋转角度 `rotate`
226
- - 滤镜 `filters`
227
- - 超链接 `link`
228
-
229
- - 形状
230
- - 类型 `type='shape'`
231
- - 水平坐标 `left`
232
- - 垂直坐标 `top`
233
- - 宽度 `width`
234
- - 高度 `height`
235
- - 边框颜色 `borderColor`
236
- - 边框宽度 `borderWidth`
237
- - 边框类型(实线、点线、虚线) `borderType`
238
- - 非实线边框样式 `borderStrokeDasharray`
239
- - 阴影 `shadow`
240
- - 填充(颜色、图片、渐变、图案) `fill`
241
- - 内容文字(HTML富文本,与文字元素一致) `content`
242
- - 垂直翻转 `isFlipV`
243
- - 水平翻转 `isFlipH`
244
- - 旋转角度 `rotate`
245
- - 形状类型 `shapType`
246
- - 垂直对齐方向 `vAlign`
247
- - 形状路径 `path`
248
- - 形状调整参数 `keypoints`
249
- - 元素名 `name`
250
- - 自动调整大小 `autoFit`
251
- - 文本内边距(4边) `textInset`
252
- - 超链接 `link`
253
-
254
- - 表格
255
- - 类型 `type='table'`
256
- - 水平坐标 `left`
257
- - 垂直坐标 `top`
258
- - 宽度 `width`
259
- - 高度 `height`
260
- - 边框(4边) `borders`
261
- - 单元格样式与数据 `data`
262
- - 行高 `rowHeights`
263
- - 列宽 `colWidths`
264
-
265
- - 图表
266
- - 类型 `type='chart'`
267
- - 水平坐标 `left`
268
- - 垂直坐标 `top`
269
- - 宽度 `width`
270
- - 高度 `height`
271
- - 图表数据 `data`
272
- - 图表主题色 `colors`
273
- - 图表类型 `chartType`
274
- - 柱状图方向 `barDir`
275
- - 是否带数据标记 `marker`
276
- - 环形图尺寸 `holeSize`
277
- - 分组模式 `grouping`
278
- - 图表样式 `style`
279
-
280
- - 视频
281
- - 类型 `type='video'`
282
- - 水平坐标 `left`
283
- - 垂直坐标 `top`
284
- - 宽度 `width`
285
- - 高度 `height`
286
- - 资源引用路径 `ref`
287
- - 视频blob `blob`
288
-
289
- - 音频
290
- - 类型 `type='audio'`
291
- - 水平坐标 `left`
292
- - 垂直坐标 `top`
293
- - 宽度 `width`
294
- - 高度 `height`
295
- - 资源引用路径 `ref`
296
- - 音频blob `blob`
297
-
298
- - 公式
299
- - 类型 `type='math'`
300
- - 水平坐标 `left`
301
- - 垂直坐标 `top`
302
- - 宽度 `width`
303
- - 高度 `height`
304
- - 公式图片引用路径 `picRef`
305
- - 公式图片base64 `picBase64`
306
- - 公式图片blob `picBlob`
307
- - LaTeX表达式(仅支持常见结构) `latex`
308
- - 文本(文本和公式混排时存在) `text`
309
-
310
- - Smart图
311
- - 类型 `type='diagram'`
312
- - 水平坐标 `left`
313
- - 垂直坐标 `top`
314
- - 宽度 `width`
315
- - 高度 `height`
316
- - 子元素集合 `elements`
317
- - 文本列表(Smart图中的文字内容清单) `textList`
318
-
319
- - 多元素组合
320
- - 类型 `type='group'`
321
- - 水平坐标 `left`
322
- - 垂直坐标 `top`
323
- - 宽度 `width`
324
- - 高度 `height`
325
- - 子元素集合 `elements`
326
-
327
- ### 更详细类型请参考 👇
328
- [https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts](https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts)
329
-
330
- # 🙏 感谢
331
- 本仓库大量参考了 [PPTX2HTML](https://github.com/g21589/PPTX2HTML) [PPTXjs](https://github.com/meshesha/PPTXjs) 的实现。
332
- > 与它们不同的是:pptxtojson 不是将PPT文件转换为 HTML 页面,而是转换为干净、易读的 JSON 数据,且在原有基础上进行了大量优化补充,大幅提升了提取信息的完整度和准确度。
333
-
334
- # 📄 开源协议
335
- MIT License | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)
1
+ # 🎨 pptxtojson
2
+
3
+ [![npm-version](https://img.shields.io/npm/v/pptxtojson)](https://www.npmjs.com/package/pptxtojson)
4
+ [![npm download](https://img.shields.io/npm/dm/pptxtojson)](https://www.npmjs.com/package/pptxtojson)
5
+ [![GitHub issues](https://img.shields.io/github/issues-closed/pipipi-pikachu/pptxtojson)](https://github.com/pipipi-pikachu/pptxtojson/issues)
6
+ [![license](https://img.shields.io/github/license/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/blob/master/LICENSE)
7
+ [![GitHub stars](https://img.shields.io/github/stars/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/stargazers)
8
+ [![GitHub forks](https://img.shields.io/github/forks/pipipi-pikachu/pptxtojson)](https://www.github.com/pipipi-pikachu/pptxtojson/network/members)
9
+
10
+ [简体中文](README_zh.md) | English
11
+
12
+ **pptxtojson is a browser-first PPTX parser that converts `.pptx` files into clean, readable, structured JSON.**
13
+
14
+ Live demo: https://pipipi-pikachu.github.io/pptxtojson/
15
+
16
+ > China mirrors, regularly synced: [Gitee](https://gitee.com/pptist/pptxtojson), [GitCode](https://gitcode.com/pipipi-pikachu/pptxtojson)
17
+
18
+ # ✨ Core Capabilities
19
+
20
+ - **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.
21
+ - **Readable JSON output**: Organize results by slides, elements, assets, themes, and related structures instead of exposing raw Office XML as low-level objects.
22
+ - **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.
23
+
24
+ # 🚀 Use Cases
25
+
26
+ - **Web editor import**: Convert PPTX slides and elements into an editable data model, such as [PPTist](https://github.com/pipipi-pikachu/PPTist).
27
+ - **Content extraction**: Extract text, speaker notes, media assets, and other information for search, archiving, review, or data analysis.
28
+ - **AI document understanding**: Turn presentation content into structured input for summarization, question answering, knowledge-base ingestion, and similar workflows.
29
+ - **Custom rendering**: Build your own preview, thumbnails, editing canvas, or conversion pipeline from the JSON result.
30
+
31
+ # 🔨 Installation
32
+ ```
33
+ npm install pptxtojson
34
+ ```
35
+
36
+ # 💿 Usage
37
+ ```javascript
38
+ parse(file, options = {})
39
+ ```
40
+
41
+ ### Browser Example
42
+ ```html
43
+ <input type="file" accept="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
44
+ ```
45
+
46
+ ```javascript
47
+ import { parse } from 'pptxtojson'
48
+
49
+ document.querySelector('input').addEventListener('change', evt => {
50
+ const file = evt.target.files[0]
51
+
52
+ const reader = new FileReader()
53
+ reader.onload = async e => {
54
+ const json = await parse(e.target.result, {
55
+ imageMode: 'base64',
56
+ videoMode: 'none',
57
+ audioMode: 'none',
58
+ })
59
+ console.log(json)
60
+ }
61
+ reader.readAsArrayBuffer(file)
62
+ })
63
+ ```
64
+
65
+ ### Node.js Example (experimental, v1.5.0+)
66
+ ```javascript
67
+ const pptxtojson = require('pptxtojson/dist/index.cjs')
68
+ const fs = require('fs')
69
+
70
+ async function func() {
71
+ const buffer = fs.readFileSync('test.pptx')
72
+
73
+ const json = await pptxtojson.parse(buffer.buffer, {
74
+ imageMode: 'base64',
75
+ videoMode: 'none',
76
+ audioMode: 'none',
77
+ })
78
+ console.log(json)
79
+ }
80
+
81
+ func()
82
+ ```
83
+
84
+ ### Output Example
85
+ ```javascript
86
+ {
87
+ "slides": [
88
+ {
89
+ "fill": {
90
+ "type": "color",
91
+ "value": "#FF0000"
92
+ },
93
+ "elements": [
94
+ {
95
+ "left": 0,
96
+ "top": 0,
97
+ "width": 72,
98
+ "height": 72,
99
+ "borderColor": "#1F4E79",
100
+ "borderWidth": 1,
101
+ "borderType": "solid",
102
+ "borderStrokeDasharray": 0,
103
+ "fill": {
104
+ "type": "color",
105
+ "value": "#FF0000"
106
+ },
107
+ "content": "<p style=\"text-align: center;\"><span style=\"font-size: 18pt;font-family: Calibri;\">TEST</span></p>",
108
+ "isFlipV": false,
109
+ "isFlipH": false,
110
+ "rotate": 0,
111
+ "vAlign": "mid",
112
+ "name": "Rectangle 1",
113
+ "type": "shape",
114
+ "shapType": "rect"
115
+ },
116
+ // more...
117
+ ],
118
+ "layoutElements": [
119
+ // more...
120
+ ],
121
+ "note": "Speaker notes..."
122
+ },
123
+ // more...
124
+ ],
125
+ "themeColors": ['#4472C4', '#ED7D31', '#A5A5A5', '#FFC000', '#5B9BD5', '#70AD47'],
126
+ "size": {
127
+ "width": 960,
128
+ "height": 540
129
+ }
130
+ }
131
+ ```
132
+
133
+ # 🎲 Options
134
+ > `options` is optional. Default values are used when it is not provided.
135
+
136
+ - `imageMode`: Controls how image assets are parsed. Available values: `base64`, `blob`, `both`, `none`. Default: `base64`.
137
+ - `base64` means only `base64` is parsed.
138
+ - `blob` means only `blob` is parsed.
139
+ - `both` means both `base64` and `blob` are parsed.
140
+ - `none` means image content is not parsed.
141
+
142
+ - `videoMode`: Controls how video assets are parsed. Available values: `blob`, `none`. Default: `none`.
143
+ - `blob` means video `blob` is parsed.
144
+ - `none` means video content is not parsed.
145
+
146
+ - `audioMode`: Controls how audio assets are parsed. Available values: `blob`, `none`. Default: `none`.
147
+ - `blob` means audio `blob` is parsed.
148
+ - `none` means audio content is not parsed.
149
+
150
+ # 🎯 Notes
151
+
152
+ The current parsing result can achieve roughly 80%+ 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.
153
+
154
+ 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.
155
+
156
+ ### Length Units
157
+ All numeric length values in the output JSON use `pt` (point) as the unit.
158
+
159
+ ### Legacy Version Notes
160
+ - In version 0.x, all output length values used px (pixels).
161
+ - In version 1.x and earlier:
162
+ - Image elements used the `src` field to return base64 data.
163
+ - Image fills only returned `picBase64`.
164
+ - Video elements might return `blob` or `src`.
165
+ - Audio elements only returned `blob`.
166
+ - Formula images only returned `picBase64`.
167
+
168
+ # 📕 Parsed Properties
169
+
170
+ - Slide theme colors `themeColors`
171
+
172
+ - Embedded font list `usedFonts`
173
+
174
+ - Slide size `size`
175
+ - Width `width`
176
+ - Height `height`
177
+
178
+ - Slides `slides`
179
+
180
+ - Speaker notes `note`
181
+
182
+ - Slide background fill (color, image, gradient, pattern) `fill`
183
+ - Solid color fill `type='color'`
184
+ - Image fill `type='image'`
185
+ - Gradient fill `type='gradient'`
186
+ - Pattern fill `type='pattern'`
187
+
188
+ - Slide transition `transition`
189
+ - Type `type`
190
+ - Duration `duration`
191
+ - Direction `direction`
192
+
193
+ - Slide elements `elements` / master layout elements `layoutElements`
194
+ - Text
195
+ - Type `type='text'`
196
+ - Horizontal coordinate `left`
197
+ - Vertical coordinate `top`
198
+ - Width `width`
199
+ - Height `height`
200
+ - Border color `borderColor`
201
+ - Border width `borderWidth`
202
+ - Border type (solid, dotted, dashed) `borderType`
203
+ - Non-solid border style `borderStrokeDasharray`
204
+ - Shadow `shadow`
205
+ - Fill (color, image, gradient, pattern) `fill`
206
+ - Text content (HTML rich text) `content`:
207
+ - Inline styles/structure: font family, font size, color, gradient, underline, strikethrough, italic, bold, character spacing, shadow, superscript/subscript, hyperlink
208
+ - Block-level styles/structure: horizontal alignment, line spacing, paragraph spacing, indentation, first-line indentation, bullets, numbered lists
209
+ - Vertical flip `isFlipV`
210
+ - Horizontal flip `isFlipH`
211
+ - Rotation angle `rotate`
212
+ - Vertical alignment `vAlign`
213
+ - Whether it is vertical text `isVertical`
214
+ - Element name `name`
215
+ - Auto fit `autoFit`
216
+ - Type `type`
217
+ - `shape`: the text box height automatically adjusts according to the text content
218
+ - `text`: the text box size is fixed, and the font size is automatically scaled to fit the text box (note: when `autoFit` does not exist, the text box size is also fixed, but the font size is not scaled)
219
+ - Font scale ratio (only for `type='text'`, default is 1) `fontScale`
220
+ - Text inset on four sides `textInset`
221
+ - Hyperlink `link`
222
+
223
+ - Image
224
+ - Type `type='image'`
225
+ - Horizontal coordinate `left`
226
+ - Vertical coordinate `top`
227
+ - Width `width`
228
+ - Height `height`
229
+ - Border color `borderColor`
230
+ - Border width `borderWidth`
231
+ - Border type (solid, dotted, dashed) `borderType`
232
+ - Non-solid border style `borderStrokeDasharray`
233
+ - Crop shape `geom`
234
+ - Crop rectangle `rect`
235
+ - Asset reference path `ref`
236
+ - Image base64 `base64`
237
+ - Image blob `blob`
238
+ - Rotation angle `rotate`
239
+ - Filters `filters`
240
+ - Hyperlink `link`
241
+
242
+ - Shape
243
+ - Type `type='shape'`
244
+ - Horizontal coordinate `left`
245
+ - Vertical coordinate `top`
246
+ - Width `width`
247
+ - Height `height`
248
+ - Border color `borderColor`
249
+ - Border width `borderWidth`
250
+ - Border type (solid, dotted, dashed) `borderType`
251
+ - Non-solid border style `borderStrokeDasharray`
252
+ - Shadow `shadow`
253
+ - Fill (color, image, gradient, pattern) `fill`
254
+ - Stroke only (no fill) `strokeOnly`
255
+ - Text content (HTML rich text, same as text elements) `content`
256
+ - Vertical flip `isFlipV`
257
+ - Horizontal flip `isFlipH`
258
+ - Rotation angle `rotate`
259
+ - Shape type `shapType`
260
+ - Vertical alignment `vAlign`
261
+ - Shape path `path`
262
+ - Shape adjustment parameters `keypoints`
263
+ - Element name `name`
264
+ - Auto fit `autoFit`
265
+ - Text inset on four sides `textInset`
266
+ - Hyperlink `link`
267
+
268
+ - Table
269
+ - Type `type='table'`
270
+ - Horizontal coordinate `left`
271
+ - Vertical coordinate `top`
272
+ - Width `width`
273
+ - Height `height`
274
+ - Borders on four sides `borders`
275
+ - Cell styles and data `data`
276
+ - Row heights `rowHeights`
277
+ - Column widths `colWidths`
278
+
279
+ - Chart
280
+ - Type `type='chart'`
281
+ - Horizontal coordinate `left`
282
+ - Vertical coordinate `top`
283
+ - Width `width`
284
+ - Height `height`
285
+ - Chart data `data`
286
+ - Chart theme colors `colors`
287
+ - Chart type `chartType`
288
+ - Bar chart direction `barDir`
289
+ - Whether markers are enabled `marker`
290
+ - Doughnut chart hole size `holeSize`
291
+ - Grouping mode `grouping`
292
+ - Chart style `style`
293
+
294
+ - Video
295
+ - Type `type='video'`
296
+ - Horizontal coordinate `left`
297
+ - Vertical coordinate `top`
298
+ - Width `width`
299
+ - Height `height`
300
+ - Asset reference path `ref`
301
+ - Video blob `blob`
302
+
303
+ - Audio
304
+ - Type `type='audio'`
305
+ - Horizontal coordinate `left`
306
+ - Vertical coordinate `top`
307
+ - Width `width`
308
+ - Height `height`
309
+ - Asset reference path `ref`
310
+ - Audio blob `blob`
311
+
312
+ - Formula
313
+ - Type `type='math'`
314
+ - Horizontal coordinate `left`
315
+ - Vertical coordinate `top`
316
+ - Width `width`
317
+ - Height `height`
318
+ - Formula image reference path `picRef`
319
+ - Formula image base64 `picBase64`
320
+ - Formula image blob `picBlob`
321
+ - LaTeX expression (only common structures are supported) `latex`
322
+ - Text (exists when text and formulas are mixed) `text`
323
+
324
+ - SmartArt
325
+ - Type `type='diagram'`
326
+ - Horizontal coordinate `left`
327
+ - Vertical coordinate `top`
328
+ - Width `width`
329
+ - Height `height`
330
+ - Child elements `elements`
331
+ - Text list (text content list in SmartArt) `textList`
332
+
333
+ - Group
334
+ - Type `type='group'`
335
+ - Horizontal coordinate `left`
336
+ - Vertical coordinate `top`
337
+ - Width `width`
338
+ - Height `height`
339
+ - Child elements `elements`
340
+
341
+ ### See more detailed types here 👇
342
+ [https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts](https://github.com/pipipi-pikachu/pptxtojson/blob/master/dist/index.d.ts)
343
+
344
+ # 🙏 Acknowledgements
345
+ pptxtojson refers heavily to the implementations of [PPTX2HTML](https://github.com/g21589/PPTX2HTML) and [PPTXjs](https://github.com/meshesha/PPTXjs).
346
+
347
+ 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.
348
+
349
+ Issues and PRs with more PPTX samples, parsing scenarios, and improvement suggestions are welcome.
350
+
351
+ # 📄 License
352
+ MIT License | Copyright © 2020-PRESENT [pipipi-pikachu](https://github.com/pipipi-pikachu)