@deepseek-ai/libreoffice-kit 0.0.2-rc9 → 0.0.3
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/NOTICE +0 -240
- package/README.md +53 -43
- package/README.zh.md +58 -35
- package/lib/cli.js +725 -132
- package/lib/index.js +757 -133
- package/lib/types/engine.d.ts +5 -5
- package/lib/types/font-loader.d.ts +18 -16
- package/lib/types/fonts.d.ts +38 -21
- package/lib/types/image-operations.d.ts +1 -1
- package/lib/types/index.d.ts +13 -7
- package/lib/types/native-image-renderer.d.ts +19 -0
- package/lib/types/native.d.ts +1 -1
- package/lib/types/options.d.ts +3 -1
- package/lib/types/wasm.d.ts +4 -1
- package/lib/types/worker.d.ts +2 -0
- package/lib/worker.js +420 -942
- package/package.json +13 -55
- package/assets/font-subset.json +0 -70
- package/assets/font-subset.wasm +0 -0
- package/lib/browser/assets.json +0 -10
- package/lib/browser/index.js +0 -626
- package/lib/browser/types/connection.d.ts +0 -42
- package/lib/browser/types/engine-rendering.d.ts +0 -3
- package/lib/browser/types/engine-types.d.ts +0 -17
- package/lib/browser/types/font-channel.d.ts +0 -36
- package/lib/browser/types/index.d.ts +0 -14
- package/lib/browser/types/office-engine.d.ts +0 -56
- package/lib/browser/types/office-types.d.ts +0 -166
- package/lib/browser/types/office.d.ts +0 -19
- package/lib/browser/types/preparation.d.ts +0 -13
- package/lib/browser/types/protocol.d.ts +0 -137
- package/lib/browser/types/rendering.d.ts +0 -4
- package/lib/browser/types/types.d.ts +0 -115
- package/lib/browser/types/worker.d.ts +0 -2
- package/lib/browser/worker.js +0 -3796
- package/lib/browser-assets.js +0 -119
- package/lib/document.js +0 -178
- package/lib/engine-rendering.js +0 -120
- package/lib/font-config.js +0 -46
- package/lib/font-source.js +0 -395
- package/lib/font-worker.js +0 -1481
- package/lib/rendering.js +0 -99
- package/lib/sheet-geometry.js +0 -111
- package/lib/types/browser-assets.d.ts +0 -15
- package/lib/types/default-fonts.d.ts +0 -3
- package/lib/types/font-config.d.ts +0 -24
- package/lib/types/font-preferences-data.d.ts +0 -16
- package/lib/types/font-preferences.d.ts +0 -29
- package/lib/types/font-request.d.ts +0 -12
- package/lib/types/font-source-types.d.ts +0 -95
- package/lib/types/font-source.d.ts +0 -10
- package/lib/types/font-subsets.d.ts +0 -39
- package/lib/types/font-worker.d.ts +0 -2
- package/lib/types/harfbuzz-subset.d.ts +0 -11
- package/lib/types/unicode-scripts.d.ts +0 -18
- package/licenses/font-subset/harfbuzz-COPYING +0 -42
- package/licenses/font-subset/harfbuzzjs-LICENSE +0 -19
- package/licenses/javascript/fflate-LICENSE +0 -21
- package/licenses/javascript/saxes-LICENSE +0 -64
- package/licenses/javascript/xmlchars-LICENSE +0 -18
- package/sources/browser/packages/browser/package.json +0 -22
- package/sources/browser/packages/browser/src/connection.ts +0 -237
- package/sources/browser/packages/browser/src/engine-rendering.ts +0 -2
- package/sources/browser/packages/browser/src/engine-types.ts +0 -14
- package/sources/browser/packages/browser/src/font-channel.ts +0 -169
- package/sources/browser/packages/browser/src/index.ts +0 -40
- package/sources/browser/packages/browser/src/office-engine.ts +0 -397
- package/sources/browser/packages/browser/src/office-types.ts +0 -128
- package/sources/browser/packages/browser/src/office.ts +0 -128
- package/sources/browser/packages/browser/src/preparation.ts +0 -41
- package/sources/browser/packages/browser/src/protocol.ts +0 -55
- package/sources/browser/packages/browser/src/rendering.ts +0 -3
- package/sources/browser/packages/browser/src/types.ts +0 -118
- package/sources/browser/packages/browser/src/worker.ts +0 -260
- package/sources/browser/packages/browser/tsconfig.json +0 -5
- package/sources/browser/packages/browser/tsdown.config.ts +0 -7
- package/sources/browser/scripts/build-browser.mjs +0 -86
- package/sources/font-subset/engine/font-subset/README.md +0 -23
- package/sources/font-subset/engine/font-subset/README.zh.md +0 -23
- package/sources/font-subset/engine/font-subset/source.json +0 -16
- package/sources/font-subset/harfbuzzjs/config-override-subset.h +0 -7
- package/sources/font-subset/harfbuzzjs/harfbuzz-subset.symbols +0 -34
- package/sources/font-subset/scripts/build-font-subset.mjs +0 -64
- package/sources/font-subset/scripts/pack-utils.mjs +0 -69
- package/sources/font-subset/scripts/platform-matrix.mjs +0 -100
- package/sources/font-subset/scripts/verify-artifacts.mjs +0 -260
package/NOTICE
CHANGED
|
@@ -24,243 +24,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
24
24
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
26
|
SOFTWARE.
|
|
27
|
-
|
|
28
|
-
The Host font subset runtime uses HarfBuzz and the harfbuzzjs subset configuration. Exact commits and compiler settings are recorded in assets/font-subset.json and sources/font-subset/. Their MIT and Old MIT notices are retained in licenses/font-subset/.
|
|
29
|
-
|
|
30
|
-
Font preference data
|
|
31
|
-
|
|
32
|
-
https://raw.githubusercontent.com/chromium/chromium/ffaf825e8c2e27fccc089b425f9f114d275804ae/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc
|
|
33
|
-
/*
|
|
34
|
-
* Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights
|
|
35
|
-
* reserved.
|
|
36
|
-
*
|
|
37
|
-
* Redistribution and use in source and binary forms, with or without
|
|
38
|
-
* modification, are permitted provided that the following conditions are
|
|
39
|
-
* met:
|
|
40
|
-
*
|
|
41
|
-
* * Redistributions of source code must retain the above copyright
|
|
42
|
-
* notice, this list of conditions and the following disclaimer.
|
|
43
|
-
* * Redistributions in binary form must reproduce the above
|
|
44
|
-
* copyright notice, this list of conditions and the following disclaimer
|
|
45
|
-
* in the documentation and/or other materials provided with the
|
|
46
|
-
* distribution.
|
|
47
|
-
* * Neither the name of Google Inc. nor the names of its
|
|
48
|
-
* contributors may be used to endorse or promote products derived from
|
|
49
|
-
* this software without specific prior written permission.
|
|
50
|
-
*
|
|
51
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
52
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
53
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
54
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
55
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
56
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
57
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
58
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
59
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
60
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
61
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
https://raw.githubusercontent.com/fontconfig/fontconfig/84ae86bc21c94d4aedbc02e32c9dc18b8750193c/COPYING
|
|
65
|
-
fontconfig/COPYING
|
|
66
|
-
|
|
67
|
-
Copyright © 2000,2001,2002,2003,2004,2006,2007 Keith Packard
|
|
68
|
-
Copyright © 2005 Patrick Lam
|
|
69
|
-
Copyright © 2007 Dwayne Bailey and Translate.org.za
|
|
70
|
-
Copyright © 2009 Roozbeh Pournader
|
|
71
|
-
Copyright © 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Red Hat, Inc.
|
|
72
|
-
Copyright © 2008 Danilo Šegan
|
|
73
|
-
Copyright © 2012 Google, Inc.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Permission to use, copy, modify, distribute, and sell this software and its
|
|
77
|
-
documentation for any purpose is hereby granted without fee, provided that
|
|
78
|
-
the above copyright notice appear in all copies and that both that
|
|
79
|
-
copyright notice and this permission notice appear in supporting
|
|
80
|
-
documentation, and that the name of the author(s) not be used in
|
|
81
|
-
advertising or publicity pertaining to distribution of the software without
|
|
82
|
-
specific, written prior permission. The authors make no
|
|
83
|
-
representations about the suitability of this software for any purpose. It
|
|
84
|
-
is provided "as is" without express or implied warranty.
|
|
85
|
-
|
|
86
|
-
THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
87
|
-
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
88
|
-
EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
89
|
-
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
90
|
-
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
91
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
92
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
--------------------------------------------------------------------------------
|
|
96
|
-
fontconfig/fc-case/CaseFolding.txt
|
|
97
|
-
|
|
98
|
-
© 2019 Unicode®, Inc.
|
|
99
|
-
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
|
|
100
|
-
For terms of use, see http://www.unicode.org/terms_of_use.html
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
--------------------------------------------------------------------------------
|
|
104
|
-
fontconfig/src/fcatomic.h
|
|
105
|
-
|
|
106
|
-
/*
|
|
107
|
-
* Mutex operations. Originally copied from HarfBuzz.
|
|
108
|
-
*
|
|
109
|
-
* Copyright © 2007 Chris Wilson
|
|
110
|
-
* Copyright © 2009,2010 Red Hat, Inc.
|
|
111
|
-
* Copyright © 2011,2012,2013 Google, Inc.
|
|
112
|
-
*
|
|
113
|
-
* Permission is hereby granted, without written agreement and without
|
|
114
|
-
* license or royalty fees, to use, copy, modify, and distribute this
|
|
115
|
-
* software and its documentation for any purpose, provided that the
|
|
116
|
-
* above copyright notice and the following two paragraphs appear in
|
|
117
|
-
* all copies of this software.
|
|
118
|
-
*
|
|
119
|
-
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
120
|
-
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
121
|
-
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
122
|
-
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
123
|
-
* DAMAGE.
|
|
124
|
-
*
|
|
125
|
-
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
126
|
-
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
127
|
-
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
128
|
-
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
129
|
-
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
130
|
-
*
|
|
131
|
-
* Contributor(s):
|
|
132
|
-
* Chris Wilson <chris@chris-wilson.co.uk>
|
|
133
|
-
* Red Hat Author(s): Behdad Esfahbod
|
|
134
|
-
* Google Author(s): Behdad Esfahbod
|
|
135
|
-
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
--------------------------------------------------------------------------------
|
|
139
|
-
fontconfig/src/fcfoundry.h
|
|
140
|
-
|
|
141
|
-
/*
|
|
142
|
-
Copyright © 2002-2003 by Juliusz Chroboczek
|
|
143
|
-
|
|
144
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
145
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
146
|
-
in the Software without restriction, including without limitation the rights
|
|
147
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
148
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
149
|
-
furnished to do so, subject to the following conditions:
|
|
150
|
-
|
|
151
|
-
The above copyright notice and this permission notice shall be included in
|
|
152
|
-
all copies or substantial portions of the Software.
|
|
153
|
-
|
|
154
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
155
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
156
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
157
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
158
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
159
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
160
|
-
THE SOFTWARE.
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
--------------------------------------------------------------------------------
|
|
165
|
-
fontconfig/src/fcmd5.h
|
|
166
|
-
|
|
167
|
-
/*
|
|
168
|
-
* This code implements the MD5 message-digest algorithm.
|
|
169
|
-
* The algorithm is due to Ron Rivest. This code was
|
|
170
|
-
* written by Colin Plumb in 1993, no copyright is claimed.
|
|
171
|
-
* This code is in the public domain; do with it what you wish.
|
|
172
|
-
*
|
|
173
|
-
* Equivalent code is available from RSA Data Security, Inc.
|
|
174
|
-
* This code has been tested against that, and is equivalent,
|
|
175
|
-
* except that you don't need to include two pages of legalese
|
|
176
|
-
* with every copy.
|
|
177
|
-
*
|
|
178
|
-
* To compute the message digest of a chunk of bytes, declare an
|
|
179
|
-
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
|
180
|
-
* needed on buffers full of bytes, and then call MD5Final, which
|
|
181
|
-
* will fill a supplied 16-byte array with the digest.
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
--------------------------------------------------------------------------------
|
|
186
|
-
fontconfig/src/fcmutex.h
|
|
187
|
-
|
|
188
|
-
/*
|
|
189
|
-
* Atomic int and pointer operations. Originally copied from HarfBuzz.
|
|
190
|
-
*
|
|
191
|
-
* Copyright © 2007 Chris Wilson
|
|
192
|
-
* Copyright © 2009,2010 Red Hat, Inc.
|
|
193
|
-
* Copyright © 2011,2012,2013 Google, Inc.
|
|
194
|
-
*
|
|
195
|
-
* Permission is hereby granted, without written agreement and without
|
|
196
|
-
* license or royalty fees, to use, copy, modify, and distribute this
|
|
197
|
-
* software and its documentation for any purpose, provided that the
|
|
198
|
-
* above copyright notice and the following two paragraphs appear in
|
|
199
|
-
* all copies of this software.
|
|
200
|
-
*
|
|
201
|
-
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
202
|
-
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
203
|
-
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
204
|
-
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
205
|
-
* DAMAGE.
|
|
206
|
-
*
|
|
207
|
-
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
208
|
-
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
209
|
-
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
210
|
-
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
211
|
-
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
212
|
-
*
|
|
213
|
-
* Contributor(s):
|
|
214
|
-
* Chris Wilson <chris@chris-wilson.co.uk>
|
|
215
|
-
* Red Hat Author(s): Behdad Esfahbod
|
|
216
|
-
* Google Author(s): Behdad Esfahbod
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
--------------------------------------------------------------------------------
|
|
221
|
-
fontconfig/src/ftglue.[ch]
|
|
222
|
-
|
|
223
|
-
/* ftglue.c: Glue code for compiling the OpenType code from
|
|
224
|
-
* FreeType 1 using only the public API of FreeType 2
|
|
225
|
-
*
|
|
226
|
-
* By David Turner, The FreeType Project (www.freetype.org)
|
|
227
|
-
*
|
|
228
|
-
* This code is explicitely put in the public domain
|
|
229
|
-
*
|
|
230
|
-
* ==========================================================================
|
|
231
|
-
*
|
|
232
|
-
* the OpenType parser codes was originally written as an extension to
|
|
233
|
-
* FreeType 1.x. As such, its source code was embedded within the library,
|
|
234
|
-
* and used many internal FreeType functions to deal with memory and
|
|
235
|
-
* stream i/o.
|
|
236
|
-
*
|
|
237
|
-
* When it was 'salvaged' for Pango and Qt, the code was "ported" to FreeType 2,
|
|
238
|
-
* which basically means that some macro tricks were performed in order to
|
|
239
|
-
* directly access FT2 _internal_ functions.
|
|
240
|
-
*
|
|
241
|
-
* these functions were never part of FT2 public API, and _did_ change between
|
|
242
|
-
* various releases. This created chaos for many users: when they upgraded the
|
|
243
|
-
* FreeType library on their system, they couldn't run Gnome anymore since
|
|
244
|
-
* Pango refused to link.
|
|
245
|
-
*
|
|
246
|
-
* Very fortunately, it's possible to completely avoid this problem because
|
|
247
|
-
* the FT_StreamRec and FT_MemoryRec structure types, which describe how
|
|
248
|
-
* memory and stream implementations interface with the rest of the font
|
|
249
|
-
* library, have always been part of the public API, and never changed.
|
|
250
|
-
*
|
|
251
|
-
* What we do thus is re-implement, within the OpenType parser, the few
|
|
252
|
-
* functions that depend on them. This only adds one or two kilobytes of
|
|
253
|
-
* code, and ensures that the parser can work with _any_ version
|
|
254
|
-
* of FreeType installed on your system. How sweet... !
|
|
255
|
-
*
|
|
256
|
-
* Note that we assume that Pango doesn't use any other internal functions
|
|
257
|
-
* from FreeType. It used to in old versions, but this should no longer
|
|
258
|
-
* be the case. (crossing my fingers).
|
|
259
|
-
*
|
|
260
|
-
* - David Turner
|
|
261
|
-
* - The FreeType Project (www.freetype.org)
|
|
262
|
-
*
|
|
263
|
-
* PS: This "glue" code is explicitely put in the public domain
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
|
-
Unicode data is supplied by @unicode/unicode-17.0.0 under its included MIT license.
|
package/README.md
CHANGED
|
@@ -1,71 +1,81 @@
|
|
|
1
1
|
# @deepseek-ai/libreoffice-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
import { createConverter, discoverRuntime } from '@deepseek-ai/libreoffice-kit'
|
|
5
|
+
Convert, recalculate, and directly render local Office documents with prebuilt LibreOffice engines. Use the same API in a server, desktop application, or document-processing job, with configurable fonts, cancellation, and resource limits.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Binary `.doc`, `.xls`, and `.ppt` inputs must be OLE compound documents, such as Office 97–2003 files. Renamed RTF/HTML and `.wps` inputs are unsupported. `missingFonts` is empty for binary inputs because their font tables are interpreted by LibreOffice rather than the OOXML inspector.
|
|
8
|
+
|
|
9
|
+
## Installation and usage
|
|
10
|
+
|
|
11
|
+
Install with Node.js 22.19.0 or newer:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @deepseek-ai/libreoffice-kit@0.0.3
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
npm installs the matching native engine on macOS/Windows ARM64 or x64, and the shared WASM engine on Linux. macOS and Windows require their native package; a missing or invalid package rejects `createConverter` with `unavailable`, without switching to WASM. Linux uses WASM unless a compatible development native package was installed explicitly. Conversion failures never switch engines.
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { createConverter } from '@deepseek-ai/libreoffice-kit';
|
|
21
|
+
|
|
22
|
+
const converter = await createConverter({ timeoutMs: 120_000 });
|
|
9
23
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
await converter.recalculate({ inputPath: '/private/book.xlsx', outputPath: '/private/recalculated.xlsx' })
|
|
24
|
+
const result = await converter.render({
|
|
25
|
+
inputPath: '/private/work/document.docx',
|
|
26
|
+
outputPath: '/private/work/document.pdf',
|
|
27
|
+
});
|
|
28
|
+
console.log(result.backend, result.missingFonts);
|
|
16
29
|
} finally {
|
|
17
|
-
await converter.dispose()
|
|
30
|
+
await converter.dispose();
|
|
18
31
|
}
|
|
19
|
-
const runtime = await discoverRuntime() // installed CLI and API paths; no engine start
|
|
20
32
|
```
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
Native and WASM engines are platform-filtered optional dependencies. Application builders must verify the required engine is installed: native on macOS/Windows, WASM on Linux. A missing required engine rejects `createConverter()` with `unavailable`.
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
Each converter serializes renders. A render creates a separate native process or Node worker and private profile, so fonts, document state, and failures do not leak into later renders. The deadline begins after acquiring its conversion slot. An `AbortSignal` cancels queued or active work; cancellation and `dispose()` await process or worker exit and scratch cleanup. Disposed converters reject further work.
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
- Calc uses an exact `sheet` name and optional `range: 'A1:D20'`; a range requires a sheet. Without selectors, every visible sheet's data area is captured. `pages` is rejected for worksheets. Hidden/filtered rows and columns retain their display behavior. The default data area excludes formatting-only cells and standalone drawings; select an explicit range to include additional content. An empty sheet renders A1.
|
|
28
|
-
- `dpi` defaults to 144 and accepts 24–600. Each image is bounded by `maxPixels` (default and maximum 16,777,216) and `maxDimension` (default 8192 pixels per side). Large worksheet regions split on the output-pixel grid in row order. Each fragment retains the requested `sheet`/`range`; its `rectangle` identifies the exact source portion. Writer, Impress and PDF keep whole pages and reject an oversized page.
|
|
29
|
-
- `maxPages` defaults to 100 and limits the total output image count, including worksheet fragments across all selected sheets. The complete batch is checked before painting; limits reject the request instead of truncating it.
|
|
30
|
-
- `maxInputBytes`, aggregate PNG `maxOutputBytes`, font limits, and `timeoutMs` come from `ConverterOptions`. Defaults and all options are in the shipped TypeScript declarations.
|
|
31
|
-
- The manifest identifies `source: 'saved'`, the original `inputPath`, `sourceSha256`, `backend: 'wasm'`, `rasterEngine: 'libreoffice' | 'pdfium'`, total `pageCount`, selected images, dimensions, source rectangles at 96 DPI, and OOXML missing-font diagnostics. For Calc, `pageCount` is the visible sheet count and each image has `sheet`/`range` instead of `page`.
|
|
38
|
+
Converters created through the compatibility `createConverter(options)` API transparently share bounded font metadata and match results with other process-local converters using the same engine and font configuration. Disposing a converter still joins only its own work; the metadata cache remains available to later compatible converters and is bounded both by configuration count and by `maxFontResolutionEntries`, which defaults to 4096. Restart the process after changing font files.
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
For a long-lived service that wants one explicit lifecycle owner for concurrent conversion slots, create one `createConverterFactory(options)` and obtain converters through `factory.create()`. Those converters use a factory-private cache while retaining separate Workers, native helpers, profiles, and output ownership. Dispose the factory to stop and join every converter it created.
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
`convert()` exports the format named by the output suffix, `recalculate()` refreshes spreadsheet formula results before saving, and `renderImages()` writes a fresh directory containing PNG tiles plus `manifest.json`. Office images are painted directly from one loaded model; PDF images use PDFium. The CLI exposes the same operations through `libreoffice-kit capabilities|convert|recalculate|render`.
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
libreoffice-kit capabilities --json
|
|
39
|
-
libreoffice-kit render --input report.docx --output-dir new-images --pages 1,3 --dpi 144
|
|
40
|
-
libreoffice-kit render --input book.xlsx --output-dir new-sheet --sheet 'Summary' --range A1:D20
|
|
41
|
-
libreoffice-kit render --input document.pdf --output-dir new-pdf-images
|
|
42
|
-
libreoffice-kit convert --input report.docx --output report.pdf
|
|
43
|
-
libreoffice-kit convert --input book.xlsx --output table.csv --sheet 'Summary'
|
|
44
|
-
libreoffice-kit recalculate --input book.xlsx --output checked.xlsx
|
|
45
|
-
```
|
|
44
|
+
Conversion workers run the package's shipped JavaScript with an empty `execArgv`; consumer launch flags such as `--input-type=module` are not inherited.
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
On Linux, the native child searches the selected engine's program directory before system paths for shared libraries. Caller-provided `LD_LIBRARY_PATH` and `LD_PRELOAD` are not inherited.
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
The caller authorizes input access and owns private input/output directories; paths must be absolute and remain unchanged during conversion. Input files must be regular Office files within the configured byte limits. ZIP entry and uncompressed-size limits apply to OOXML; binary DOC/XLS/PPT files use OLE compound containers validated by the LibreOffice importer. Binary formats retain the same conversion deadline and input/output limits. Output creation uses exclusive mode and permissions `0600`; an existing output is never overwritten. Failed or cancelled renders remove newly created outputs. `maxOutputBytes` limits the returned PDF and its read buffer; native temporary disk files can grow until export completes, then oversized PDFs are rejected and deleted before Node reads them. The caller owns successful PDFs and may send their bytes to a browser PDF viewer.
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
`ConversionError.code` distinguishes `invalid-document`, `unsupported-format`, `input-too-large`, `output-too-large`, `invalid-output`, `timeout`, `unavailable`, and `failed`. These codes survive the worker/native transports. Invalid installation assets reject creation as `unavailable`; they never enable fallback. Filesystem errors such as `EEXIST`, invalid configuration errors, and caller cancellation reasons remain unchanged.
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
## Engines, fonts, and runtime behavior
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
The Node API and engine packages share the kit release version. `ENGINE_VERSION` pins both WASM and native optional dependencies to the exact engine version. npm installs prepared engines; installation and conversion never compile LibreOffice or download additional engine payloads. Each engine includes its matching source recipes, patches, build information, and third-party license notices under `sources/` and `licenses/`.
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
Defaults and all options are documented in the shipped TypeScript declarations in `lib/types/index.d.ts`. Font directories use conventional system/user paths for the selected OS. Indexing skips missing or protected sources and propagates other filesystem errors. `fontkit` indexes original font files and selects installed faces and glyph coverage; it does not rewrite fonts. The converter reuses its first font metadata snapshot; recreate the converter after changing installed fonts. Original font bytes and decoded glyph coverage remain conversion-local. `missingFonts` contains absent families declared in readable document XML, excluding unrelated engine defaults. Missing glyphs without a named missing family are not a complete document accessibility report.
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
When `fontDirectories` is omitted on macOS or Windows, default discovery also checks Microsoft Office's bundled/private font directory and the user's Office font cache. Only curated Office-compatible families absent from normal system roots are added, including SimSun and Microsoft YaHei. Explicit `fontDirectories` disables this supplemental discovery.
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
Exact installed families take priority in font matching, including explicitly requested handwriting or decorative fonts. Default `fontFallbacks` prefer common serif, sans-serif, and monospaced text families and corresponding Simplified Chinese faces, with Carlito for Calibri and Calibri Light, and Caladea for Cambria. Catalog matching retains the weight and italic style supplied by WASM font requests when matching faces are installed. The complete indexed catalog remains available for glyphs absent from the preferred families. Caller-provided groups replace the defaults; `[]` removes these preferences without disabling catalog discovery. WASM uses the same ordered aliases for imported fonts. The shipped option types describe `fontFallbacks`.
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
Native conversion writes missing-family choices into its private LibreOffice profile. LibreOffice resolves installed originals and its metric-compatible fonts before consulting these choices, so custom groups can produce different substitutions across engines. Native weight and italic selection depend on the engine and the fonts it can discover; native font preloading requests regular faces.
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
`maxFontFiles` and `maxFontFileBytes` bound font indexing; `maxLoadedFontBytes` bounds original files explicitly imported by this kit per conversion. WASM uses only imported originals and rejects with `unavailable` when no usable fonts are found; install fonts or configure `fontDirectories` before converting in a minimal container. Native macOS and Windows engines can also use OS-managed fonts, so the import limit is not a cap on native total font memory. Font matching and XML work run inside the cancellable worker; no browser font RPC or DOM is involved.
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
Node WASM image downscaling uses LibreOffice's CPU image filter. Text layout, font matching, and PDF serialization are CPU work as well.
|
|
67
|
+
|
|
68
|
+
For reproducible comparisons, use identical documents, fonts, DPI, and limits; WASM installations run on Linux. Report engine startup together with conversion time; every render starts a fresh engine. The WASM assets and platform payloads carry their source, license, and integrity manifests.
|
|
68
69
|
|
|
69
70
|
## Source and license
|
|
70
71
|
|
|
71
|
-
This package is licensed under [MPL-2.0](LICENSE).
|
|
72
|
+
This package is licensed under [MPL-2.0](LICENSE). The engine packages include `prebuilds.json` integrity inventories, corresponding source recipes and patches in `sources/`, and third-party redistribution notices in `licenses/`.
|
|
73
|
+
|
|
74
|
+
## Limitations
|
|
75
|
+
|
|
76
|
+
- Fidelity depends on source formatting, installed fonts, and the selected engine. Missing-font names do not report every missing glyph.
|
|
77
|
+
- DOC/DOCX/ODT, XLS/XLSX/ODS, and PPT/PPTX/ODP conversion is supported; direct image rendering additionally accepts PDF. Conversion does not discover system LibreOffice or download engines and fonts.
|
|
78
|
+
- Font import and output limits do not bound all native memory or temporary disk use. Native platform engines may resolve fonts differently from WASM.
|
|
79
|
+
- Installations from npm use platform-specific optional packages. Applications that bundle engines must retain the complete selected package, including its resources and notices.
|
|
80
|
+
- Windows requires the Microsoft Visual C++ v14 Redistributable matching the Node.js architecture (x64 or ARM64); it is not bundled. Use ARM64 Node.js for the Windows ARM64 engine.
|
|
81
|
+
- Version `0.0.3` ships macOS and Windows native engines for ARM64 and x64 and a shared Node WASM engine for Linux. Other native platforms are development recipes.
|
package/README.zh.md
CHANGED
|
@@ -1,58 +1,81 @@
|
|
|
1
1
|
# @deepseek-ai/libreoffice-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
使用预编译 LibreOffice 引擎,在 Node.js 中转换、重算并直接渲染本地 Office 文档。通过同一套 API,为服务端、桌面应用和文档处理任务提供可配置字体、取消和资源限制。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
二进制 `.doc`、`.xls`、`.ppt` 输入必须是 OLE 复合文档,例如 Office 97–2003 文件。不支持改后缀的 RTF/HTML 和 `.wps`。二进制输入的 `missingFonts` 为空,因为其字体表由 LibreOffice 读取,而不是由 OOXML 检查器读取。
|
|
8
|
+
|
|
9
|
+
## 安装与使用
|
|
10
|
+
|
|
11
|
+
使用 Node.js 22.19.0 或更新版本安装:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @deepseek-ai/libreoffice-kit@0.0.3
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
npm 在 macOS/Windows ARM64 或 x64 上安装匹配的原生引擎,在 Linux 上安装共享 WASM 引擎。macOS 和 Windows 必须具有对应原生包;包缺失或无效时,`createConverter` 以 `unavailable` 拒绝,不会切换到 WASM。Linux 使用 WASM,除非显式安装了兼容的原生开发包。转换失败不会切换引擎。
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { createConverter } from '@deepseek-ai/libreoffice-kit';
|
|
21
|
+
|
|
22
|
+
const converter = await createConverter({ timeoutMs: 120_000 });
|
|
10
23
|
try {
|
|
11
|
-
await converter.
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
const result = await converter.render({
|
|
25
|
+
inputPath: '/private/work/document.docx',
|
|
26
|
+
outputPath: '/private/work/document.pdf',
|
|
27
|
+
});
|
|
28
|
+
console.log(result.backend, result.missingFonts);
|
|
29
|
+
} finally {
|
|
30
|
+
await converter.dispose();
|
|
31
|
+
}
|
|
14
32
|
```
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
原生与 WASM 引擎是按平台筛选的可选依赖。应用构建方必须验证所需引擎已安装:macOS/Windows 使用原生引擎,Linux 使用 WASM。必需引擎缺失时,`createConverter()` 以 `unavailable` 拒绝。
|
|
17
35
|
|
|
18
|
-
|
|
19
|
-
- Excel 使用精确 `sheet` 名称与可选 A1 `range`,范围必须指定工作表。不传选择器时渲染全部可见表的数据区,拒绝打印页码。隐藏/筛选行列保留显示行为。默认数据区不包含仅有格式的单元格或独立绘图对象,可显式指定更大范围;空表渲染 A1。
|
|
20
|
-
- `dpi` 默认 144,范围 24–600;每图 `maxPixels` 默认且最多 16,777,216,`maxDimension` 默认每边 8192 像素。大表区域按输出像素网格、从上到下逐行拆图;每片保留原请求 `sheet`/`range`,`rectangle` 标明该片的准确源区域。Word、PPT、PDF 保持完整页面,单页超限时报错。
|
|
21
|
-
- `maxPages` 默认 100,限制全部工作表拆片后的输出图片总数。绘图前检查完整批次,超限明确报错,不截断批次。
|
|
22
|
-
- 输入、全部 PNG 字节总量、字体和超时受 `ConverterOptions` 限制。完整选项与默认值见随包 TypeScript 声明。
|
|
23
|
-
- 清单包含 `source:'saved'`、原输入路径与 SHA256、`backend:'wasm'`、实际 `rasterEngine`、总页数、已选图片及尺寸、96 DPI 下源矩形。Excel 总页数表示可见工作表数,图片使用 `sheet`/`range` 而非 `page`。
|
|
36
|
+
每个转换器串行执行渲染。一次渲染会创建独立的原生进程或 Node worker 以及私有配置目录,因此字体、文档状态和失败不会泄漏到后续渲染。截止时间在获得转换槽位之后开始计算。`AbortSignal` 可以取消排队中或进行中的工作;取消和 `dispose()` 都会等待进程或 worker 退出并完成临时文件清理。已释放的转换器会拒绝后续工作。
|
|
24
37
|
|
|
25
|
-
|
|
38
|
+
通过兼容 API `createConverter(options)` 创建的转换器,会自动与进程内使用相同引擎及字体配置的其他转换器共享有界字体元数据和匹配结果。释放 converter 仍只等待它自己的工作;元数据缓存会留给后续兼容 converter,并同时受配置数量和默认值为 4096 的 `maxFontResolutionEntries` 限制。字体文件发生变化后需要重启进程。
|
|
26
39
|
|
|
27
|
-
|
|
40
|
+
长驻服务如果需要为多个并发转换槽提供一个显式生命周期所有者,可创建 `createConverterFactory(options)`,再通过 `factory.create()` 建立转换器。这些转换器使用 factory 私有缓存,同时仍分别拥有 Worker、原生 helper、配置目录和输出。释放 factory 会停止并等待它创建的全部转换器。
|
|
28
41
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
libreoffice-kit convert --input book.xlsx --output table.csv --sheet '汇总'
|
|
35
|
-
libreoffice-kit recalculate --input book.xlsx --output checked.xlsx
|
|
36
|
-
```
|
|
42
|
+
`convert()` 按输出后缀导出格式,`recalculate()` 在保存前刷新电子表格公式结果,`renderImages()` 在全新目录中写入 PNG tile 和 `manifest.json`。Office 图像直接从一次加载的模型绘制,PDF 使用 PDFium。CLI 通过 `libreoffice-kit capabilities|convert|recalculate|render` 提供相同行为。
|
|
43
|
+
|
|
44
|
+
转换 worker 以空的 `execArgv` 运行包内发布的 JavaScript;`--input-type=module` 之类的调用方启动参数不会被继承。
|
|
45
|
+
|
|
46
|
+
在 Linux 上,原生子进程会先在所选引擎的 program 目录中查找共享库,然后才查找系统路径。调用方提供的 `LD_LIBRARY_PATH` 和 `LD_PRELOAD` 不会被继承。
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
调用方负责授权输入访问并拥有私有输入/输出目录;路径必须是绝对路径,并在转换期间保持不变。输入文件必须是常规 Office 文件,且在配置的字节限制之内。ZIP 条目数和解压大小限制适用于 OOXML;二进制 DOC/XLS/PPT 使用 OLE 复合容器,内部结构由 LibreOffice 导入器验证。二进制格式仍遵守相同的转换超时和输入/输出限制。输出创建使用独占模式和 `0600` 权限;已存在的输出绝不会被覆盖。失败或取消的渲染会删除新建的输出。`maxOutputBytes` 限制返回的 PDF 及其读取缓冲区;原生临时磁盘文件在导出完成前可能继续增长,随后过大的 PDF 会在 Node 读取之前被拒绝并删除。成功的 PDF 归调用方所有,调用方可以将其字节发送给浏览器 PDF 阅读器。
|
|
39
49
|
|
|
40
|
-
`
|
|
50
|
+
`ConversionError.code` 区分 `invalid-document`、`unsupported-format`、`input-too-large`、`output-too-large`、`invalid-output`、`timeout`、`unavailable` 和 `failed`。这些 code 会原样穿过 worker 和原生传输层。无效的安装资源会让创建以 `unavailable` 拒绝;它们绝不会启用回退。`EEXIST` 等文件系统错误、无效配置错误和调用方取消原因保持原样。
|
|
41
51
|
|
|
42
|
-
##
|
|
52
|
+
## 引擎、字体与运行行为
|
|
43
53
|
|
|
44
|
-
Node
|
|
54
|
+
Node API 与引擎包使用相同的 kit 发布版本。`ENGINE_VERSION` 将 WASM 和原生可选依赖固定到精确的引擎版本。npm 安装预编译引擎;安装和转换阶段均不会编译 LibreOffice 或额外下载引擎资源。每个引擎包的 `sources/` 和 `licenses/` 保留匹配的源码配方、补丁、构建信息和第三方许可声明。
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
默认值和所有选项记录在随包发布的 `lib/types/index.d.ts` 类型声明中。字体目录使用所选操作系统的常规系统/用户路径。索引会跳过缺失或受保护的来源,并传播其他文件系统错误。`fontkit` 索引原始字体文件并选择已安装的字面和字形覆盖;它不重写字体。转换器复用其第一次字体元数据快照;更改已安装字体后需重新创建转换器。原始字体字节和解码后的字形覆盖都只在本次转换内有效。精确的 family 匹配优先于 `fontFallbacks`。`missingFonts` 包含可读文档 XML 中声明但缺失的 family,不包含无关的引擎默认值。未命名缺失 family 的缺字并不构成完整的文档可访问性报告。
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
macOS 或 Windows 上省略 `fontDirectories` 时,默认发现还会检查 Microsoft Office 的捆绑/私有字体目录和用户 Office 字体缓存。只补充常规系统目录中不存在的精选 Office 兼容字体族,包括宋体和微软雅黑。显式 `fontDirectories` 会关闭这项补充发现。
|
|
49
59
|
|
|
50
|
-
|
|
60
|
+
精确匹配的已安装 family 优先,包括调用方显式要求的书法或装饰字体。默认 `fontFallbacks` 优先选择常见的衬线、无衬线、等宽文本字体族以及对应的简体中文字面,为 Calibri 和 Calibri Light 使用 Carlito,为 Cambria 使用 Caladea。当匹配的字面已安装时,目录匹配保留 WASM 字体请求给出的字重和斜体。完整索引目录对首选字体族缺失的字形仍然可用。调用方提供的分组会替换默认值;`[]` 会移除这些偏好但不关闭目录发现。WASM 对导入的字体使用相同的顺序别名。随包发布的选项类型包含 `fontFallbacks` 的定义。
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
原生转换会把缺失 family 的选择写入其私有 LibreOffice 配置。LibreOffice 会先解析已安装的原始字体及其度量兼容字体,然后才参考这些选择,因此自定义分组在不同引擎上可能产生不同的替换结果。原生的字重和斜体选择取决于引擎及其能发现的字体;原生字体预加载只请求常规字面。
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
`maxFontFiles` 和 `maxFontFileBytes` 限制字体索引;`maxLoadedFontBytes` 限制本次转换中由本 kit 显式导入的原始文件。WASM 只使用导入的原始文件,找不到可用字体时以 `unavailable` 拒绝;在最小化容器中转换前请安装字体或配置 `fontDirectories`。原生 macOS 和 Windows 引擎还可以使用操作系统管理的字体,因此该导入限制不是原生字体总内存的上限。字体匹配和 XML 处理在可取消的 worker 内运行;不涉及浏览器字体 RPC 或 DOM。
|
|
65
|
+
|
|
66
|
+
Node WASM 的图像降采样使用 LibreOffice 的 CPU 图像过滤器。文本排版、字体匹配和 PDF 序列化同样由 CPU 完成。
|
|
67
|
+
|
|
68
|
+
为获得可复现的比较结果,请使用相同的文档、字体、DPI 和限制;WASM 安装在 Linux 上运行。报告时应把引擎启动时间和转换时间一起给出;每次渲染都会启动一个全新的引擎。WASM 资源和平台载荷都带有各自的源码、许可证和完整性清单。
|
|
55
69
|
|
|
56
70
|
## 源码与许可
|
|
57
71
|
|
|
58
|
-
|
|
72
|
+
本包使用 [MPL-2.0](LICENSE) 许可。引擎包包含 `prebuilds.json` 完整性清单、`sources/` 对应源码配方和补丁,以及 `licenses/` 第三方再分发声明。
|
|
73
|
+
|
|
74
|
+
## 使用限制
|
|
75
|
+
|
|
76
|
+
- 保真度取决于源格式、已安装字体和所选引擎。缺失字体名称不能报告所有缺字。
|
|
77
|
+
- 支持 DOC/DOCX/ODT、XLS/XLSX/ODS 和 PPT/PPTX/ODP 转换;直接图像渲染还接受 PDF。转换不发现系统 LibreOffice,也不下载引擎和字体。
|
|
78
|
+
- 字体导入和输出限制不能约束全部原生内存或临时磁盘使用。原生平台引擎的字体解析可能与 WASM 不同。
|
|
79
|
+
- npm 安装使用按平台选择的可选包。自行打包引擎的应用需要保留所选包的完整内容,包括资源和许可声明。
|
|
80
|
+
- Windows 需要系统安装与 Node.js 架构一致的 Microsoft Visual C++ v14 Redistributable(x64 或 ARM64);包中不捆绑该运行库。Windows ARM64 引擎需要使用 ARM64 Node.js。
|
|
81
|
+
- `0.0.3` 提供 macOS 和 Windows 的 ARM64、x64 原生引擎,以及供 Linux 使用的共享 Node WASM 引擎;其他原生平台仅保留开发构建配方。
|