Skip to main content

SOFTWARE

DocExtr

Document Extractor

DocExtr extracts text, tables, and images from HWP/HWPX, PDF, Word, and PowerPoint documents. It provides a CLI and Python library.

0.1.1MIT · CLI · Python

Key features

Building search indexes or LLM input first requires pulling body text and tables out of HWP, PDF, and Office documents. DocExtr extracts business documents, including HWP and HWPX, through one CLI and Python library, and processes whole directories and archives in batch.

  • Korean documents — Text, tables, and images from HWP and HWPX without prior conversion
  • Four purpose-specific results — Markdown and document structure for AI agents, source-faithful text and Markdown, embedding chunks, and search documents
  • Document structure — PDF pages, PPTX slides, and HWP sections; merged cells; image positions in the body
  • Archives — Nested archives inside ZIP and TAR in one pass; encrypted ZIP support; depth and size limits against archive bombs
  • Batch processing — Parallel extraction across directories; damaged documents are recorded as errors while the rest continue
  • Output targets — Per-document directories, JSONL shards, or SQLite, PostgreSQL, and MySQL/MariaDB document and chunk tables

Downloads

Linux x86_64 and Windows x64 CLI executables, plus Linux CPython 3.9–3.14 wheels. Choose the file matching your operating system and Python version.

Version: 0.1.1 (2026-10-11) · Changelog

CLI

Python

License

Usage

Python

This example installs the Linux x86_64 CPython 3.14 wheel. Other versions need the matching wheel from the list above. The wheel includes the OCR engine; OCR models and database output are not included.

curl -fLO https://www.cubiware.co.kr/api/download/docextr/0.1.1/docextr-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl
python3.14 -m pip install ./docextr-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl
import docextr

result = docextr.extract_file("report.hwpx")
manifest = result["manifest"]
print(manifest["status"], manifest["diagnostics"])
print(result["text"]["text"])
for asset in result["agent"]["assets"]:
    print(asset["mime_type"], len(asset["data"]))

docextr.export_file("report.hwpx", "new-report-output")

CLI · Linux (bash)

extract writes one document to a new directory as per-purpose files such as manifest.json, document.txt, document.md, agent.md, embedding.jsonl, and search.jsonl. batch processes files, directories, and archives into per-purpose JSONL shards or database tables.

curl -fLO https://www.cubiware.co.kr/api/download/docextr/0.1.1/docextr-0.1.1-linux-x86_64
chmod +x ./docextr-0.1.1-linux-x86_64

./docextr-0.1.1-linux-x86_64 extract --input report.hwpx --output new-report-output

./docextr-0.1.1-linux-x86_64 batch --input documents --output batch-output

CLI · Windows (PowerShell)

Invoke-WebRequest -Uri https://www.cubiware.co.kr/api/download/docextr/0.1.1/docextr-0.1.1-windows-x86_64.exe -OutFile ./docextr-0.1.1-windows-x86_64.exe

.\docextr-0.1.1-windows-x86_64.exe extract --input report.hwpx --output new-report-output

.\docextr-0.1.1-windows-x86_64.exe batch --input documents --output batch-output

Supported formats

FormatExtraction scope
HWP / HWPXText, paragraphs, tables, merged cells, and images by section
PDFText, tables, and image objects by page
DOCXBody text, tables, images, and supplementary text
PPTXText, tables, images, and speaker notes by slide
DOC / XLS / XLSXDOC text; spreadsheet cell text and Markdown tables
TXT / Markdown / HTMLText content; UTF-8 input
PNG / JPEGImage assets; text recognition when OCR is on
ZIP / TAR / TAR.GZ / TAR.BZ2Batch processing of enclosed documents via CLI batch

Extraction scope varies by format. Spreadsheets provide cell text and Markdown tables; embedded images are not extracted. Password-protected ZIP requires a password file. Python and CLI extract process individual files; archive processing is provided by CLI batch.

OCR reads text in images inside documents and in image files. It is off by default; the CLI and Python wheel include the engine, and the model is installed separately. Scanned PDFs are read with the page rendering option.

Extraction results

Each result has a manifest with the document status and diagnostics, plus the purposes you request: agent (cleaned Markdown, document structure, and images), text (source-faithful plain text and Markdown), embedding (chunks sized by estimated tokens), and search (search documents sized by characters). PDF page and PPTX slide order is preserved; HWP/HWPX sections are not physical pages. Python returns image bytes directly; CLI export writes separate image files.

The manifest status and diagnostics report partial extraction and errors. Database output is split into a document table and embedding and search chunk tables.

Requirements and limitations

CLI · Linux
Linux x86_64 · glibc 2.34 or later · OpenSSL 3, libstdc++, liblzma, libbz2, and zlib
CLI · Windows
Windows x64 · statically linked MSVC CRT; commands tested under Wine, not yet verified on native Windows
Python
CPython 3.9–3.14 · Linux x86_64 · glibc 2.28 or later
License
MIT; third-party dependency notices apply separately
  • HWP 4.x and password-encrypted documents are unsupported. 7z and RAR are unsupported.
  • Complex tables, image reading order, and object positions may be incomplete; check diagnostics.
  • Original-layout PDF conversion, embedding vector generation, and summarization are not provided.
  • In-process extraction cannot isolate native crashes or out-of-memory failures. Failed exports may leave partial files; use results after successful completion.
  • The Windows executable is not Authenticode-signed. SmartScreen warnings may occur, and execution is restricted in environments that require signed code.

Click the image for actual size · click outside or press Esc to close