description: "Authorized Office input and complete PDF output for Host conversion providers."
kind: "package-reference"
English | 中文
Summary
Convert authorized .doc, .docx, .xls, .xlsx, .ppt, and .pptx bytes to a complete PDF. Callers receive PDF bytes and, for OOXML inputs, missing-font families without changing the original file or adding model context.
Table of Contents
Use this package
Mount the LibreOffice provider to supply ctx.documentRender. The abstract service has no mountable implementation or configuration. Callers authorize and stat their source before passing its identity, version, optional byte size, deferred bounded read, Office extension, and scheduling priority to render(). The provider admits metadata before calling the read callback. A changed source version rejects conversion.
Understand the implementation
Implementation internals — click to expand
Providers return independent caller-owned PDF bytes, a conversion cache key, and their rendering generation. Consumers check `generation` before reusing cached PDFs; configuration replacement creates a new generation. Individual reader cancellation rejects promptly; provider disposal waits for actual reads, conversion, and scratch cleanup. Cancellation rejects with its reason; classified conversion failures use `DocumentRenderError`. Providers and consumers share this package as a peer dependency so `instanceof DocumentRenderError` recognizes their failures. No runtime invariant companion is published because this service declares operations without an independent retained observation.
Further Exploration
Model Experience
None, as this package converts bytes without model-facing tools, messages, or Session events.
KV Cache effect
None; conversion does not construct or modify model requests.
Known Limitations and Deferred Work
- The service accepts only the six listed Office formats; source authorization belongs to consumers, while shared conversion reuse belongs to the provider.
Dev Note
Working context for maintainers — click to expand
None.