ai-to-pdf-docx-odt-epub

Public

973 Downloads

12 stars

3 forks

README

ai-to-pdf-docx-odt-epub

ai-to-pdf-docx-odt-epub is an LM Studio plugin that saves model-generated Markdown as document files.

Supported formats

  • PDF
  • DOCX
  • ODT
  • EPUB
  • HTML
  • TXT
  • MD
  • RTF

What it is for

Use it to export reports, notes, articles, technical text, and scientific documents from LM Studio.

It supports common Markdown features:

  • headings, lists, tables, and code blocks
  • Unicode text, including Cyrillic
  • LaTeX-style math formulas
  • matrices, aligned equations, and chemistry notation

Rendering modes

The plugin has two document rendering paths:

  • Built-in fallback renderer for basic document creation.
  • Scientific renderer using Pandoc, Tectonic, Noto fonts, and STIX Two Math for better PDF/DOCX/ODT/EPUB output with formulas and scientific typography.

The large engines and fonts are not bundled with the plugin package. During normal document generation, the plugin does not install them automatically.

Installing document engines

If Pandoc, Tectonic, or required fonts are missing, the plugin still creates fallback files where possible and asks the user before installing anything.

install_document_engines downloads or extracts only the required components after explicit user consent. It installs them into the user's LM Studio data directory and removes temporary installer archives after extraction.

The installer does not prewarm the Tectonic cache by default. After a successful user-approved install, it can automatically resume the pending document generation so the user does not have to confirm the same export twice.

Offline installation is supported by providing a local folder with pre-downloaded archives and fonts.

Supported automatic install targets:

  • Windows x64
  • Linux x64
  • macOS x64
  • macOS arm64 / Apple Silicon

Path safety

By default, generated files are written only inside the LM Studio working directory. To allow another output root, set LMSTUDIO_AI_TO_DOCUMENT_ALLOWED_OUTPUT_ROOTS.

For offline installation, archives_dir is limited to the plugin/vendor toolchain folder, the user toolchain archive cache, or roots listed in LMSTUDIO_AI_TO_DOCUMENT_ALLOWED_ARCHIVE_ROOTS.

Tools

generate_document_verified

Creates document files from Markdown, verifies output where possible, and reports paths, warnings, and errors.

install_document_engines

Installs missing document engines and fonts after explicit consent.

Example prompt

Write a short scientific overview of physics, mathematics, and chemistry. Include equations and catalyst reactions. Save it as PDF, DOCX, ODT, EPUB, HTML, TXT, MD, and RTF.

Third-party components

License and source information for optional downloadable components is in:

vendor/toolchain/THIRD_PARTY_NOTICES.md
vendor/toolchain/licenses/