Skip to content
Search

OpenDocKit

lastmod 2026-11-23created 2026-11-221 edits

OpenDocKit is a Python library that converts documents in many formats, including PDF, Office, and Hangul (HWP/HWPX, the format of a widely used Korean word processor), into Markdown suited for feeding to LLMs. It targets files whose structure ordinary converters tend to lose, such as merged cells, multi-column PDFs, and borderless tables, and it includes its own HWP 5.x parser so it can read the document templates used by Korean government offices and companies.

About

  • A single convert_file() call does the conversion. The result contains the Markdown body (text), sections per page, slide, or sheet (sections), and warnings (warnings) that describe in plain sentences any content that was skipped or approximated, which can be used for chunking or for source references such as "page 3"
  • Reads PDF, DOCX, PPTX, XLSX, XLS, CSV, HWP, HWPX, ODT, ODS, ODP, RTF, EPUB, HTML, MHTML, email (eml, mbox), and images. Legacy .doc and .ppt files are converted through LibreOffice if it is installed
  • Fills merged-cell values into every row, keeps Excel numbers in the format shown on the sheet, and restores borderless PDF tables as tables. Charts become data tables, SmartArt becomes nested lists, and Word, PowerPoint, and Hangul equations become LaTeX
  • The HWP 5.x parser was written from scratch, and it also handles HWPX, CP949 detection, and NFC normalization
  • Detects formats by content rather than by file extension. An HTML table saved as .xls or an MHTML file named .doc is read in its actual format, with a warning
  • For servers that accept uploaded files, it sets limits on zip bombs, excessive merged cells, and multi-GB images. IsolatedConverter converts each file in a worker process with memory and time limits (2GB and 2 minutes by default), and when max_chars is exceeded it stops at that point instead of converting everything and truncating afterward
  • The base install (pip install opendockit) uses no network, produces deterministic results, and needs no GPU or ML model. There is no OCR, so scanned documents and images get descriptions from an optional vision model
  • In a benchmark on the same files as MarkItDown, Kreuzberg, Unstructured, and Docling, it passed all 49 structure checks (Docling 36, MarkItDown 31, Kreuzberg 29, Unstructured 12). The author notes that the checks were written by the author, and Kreuzberg is about 30 times faster
  • Provides a LangChain loader, a LlamaIndex reader, an MCP server (opendockit-mcp), a Claude Code plugin, a Dify Marketplace plugin, a Hermes Agent plugin, and an external extraction engine for Open WebUI. Dify and Open WebUI cannot read HWP on their own
  • Python 3.12 or later, Linux/macOS/Windows. MIT license, and the default dependencies are also MIT, BSD, or Apache family licenses (PyMuPDF and pyhwp are not used). GPL/LGPL codecs are only included in the optional heic extra

See also

Favorite site

author MCPBot sitemap