deepseek-ai / dsh-libreoffice-kit
git clone https://github.com/deepseek-ai/dsh-libreoffice-kit.git
An internal component used by DeepSeek Harness
—
stars, 24h
—
stars, 7 days
+190
stars, 30 days · #1,335
190
★ total
9
forks · 0 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageJavaScript
LicenseMPL-2.0
Created2026-09-30 (20d ago)
Last push20d ago
Watchers2
OwnerOrganization
GitHub topics
Links
- GitHub: github.com/deepseek-ai/dsh-libreoffice-kit
- Homepage: https://deepseek.com/harness/
- Releases · Issues · Hacker News mentions
README excerpt
--- description: "Font-friendly Office-to-PDF conversion in Node.js, with prebuilt LibreOffice engines." kind: "package-library" --- # @deepseek-ai/libreoffice-kit English | 中文 ## Current goal **Font-friendly Office conversion and rendering in Node.js.** Version `0.1.0` extends the stable `0.0.1` line with format conversion, spreadsheet recalculation, a CLI, direct PNG rendering, and shared converter-factory font caches while retaining the native engine packages. The priorities are document layout and readable text, explicit control over available fonts and substitutions, and an engine that applications can bundle and run offline. Size reduction serves that goal: retain the import, layout, drawing, and PDF-export machinery these documents need while removing unrelated desktop features and resources. The API supports Office export and recalculation plus direct PNG rendering of Office and PDF inputs. Use it in a Node.js service, a desktop application, or a document-processing job. Applications manage their own authorization, storage, and preview interfaces. Binary `.doc`, `.xls`, and `.ppt` support covers OLE compound documents such as Office 97–2003. RTF/HTML files renamed to these suffixes and `.wps` are not accepted. `missingFonts` reports declarations found in OOXML; binary formats return an empty list while LibreOffice performs font matching. ## Quick start Requires Node.js **22.19.0 or newer**. Install the `0.1.3` package with its optional engines: [code] The package installs the `dsoffice` command. From a local installation: [code] [code] Supply absolute paths in caller-owned private directories; the output must not already exist. The PDF is written to `outputPath`, and `render` returns the selected backend and missing-font names. Each render owns a fresh native process or Node worker and private profile. Renders on one converter are serialized; cancellation and disposal wait for engine exit and cleanup. See the Node API for cancellation, errors, and resource limits. ## What “font-friendly” means in 0.1.0 - **Use available fonts.** The API discovers conventional system/user font directories, or indexes the roots supplied through `fontDirectories`. Custom roots replace the default list. `fontkit` reads font metadata and glyph coverage; selected files are passed to the engine as original font bytes. - **Preserve requested families when available.** Exact installed families take priority, including handwriting and decorative fonts. WASM font requests also carry weight and italic information so matching installed faces can be selected; the catalog can supply additional fonts for missing glyphs. - **Make substitutions configurable.** Default `fontFallbacks` cover common Latin and Simplified Chinese families, including Carlito for missing Calibri and Caladea for missing Cambria. Caller-supplied groups replace the defaults. These preferences only select available fonts; they do not install them. See the default groups. - **Expose missing fami