DocVortex is a standalone Python engine for parsing and converting documents.
It reads native text and document structure into a unified representation,
then exports the result in the formats your workflow needs.
Parse once, export many times — reuse the same result for Markdown, HTML, LaTeX, DOCX, EPUB, PDF and structured JSON.
Portable results — save document structure and image assets in a Bundle, then export again without the source file.
Composable APIs — use the complete pipeline or integrate analysis, postprocessing and rendering separately.
Native parsing works without an OCR or VLM inference service. Use DocVortex directly through its CLI or Python SDK.
DocVortex does not download models or perform PDF OCR. When OCR is required, it reports pdf_ocr_unsupported and asks you to download and install MinerU to process the document.
PDF performance
Release 0.5.10 uses Rust acceleration: public parsing is 2.93× as fast as 0.4.25 on the tested corpus.
Pipeline
0.4.25 python
0.5.10 rust
Speedup
Time reduction
Peak RSS reduction
DocVortex public parse()
42.36 s
14.48 s
2.93×
65.82%
31.17%
MinerU Flash
44.50 s
14.44 s
3.08×
67.55%
29.84%
MinerU shared PDF processing
76.28 s
12.85 s
5.94×
83.16%
35.65%
Same-machine warm-run comparison on 32 PDFs / 299 pages (31 PDFs for Flash). The existing 0.4.25 measurements are reused. For 0.5.10, each document is warmed once and timed five times in each of three balanced rounds; times sum the medians of the three per-document medians. RSS reductions are medians of per-document process-tree peak RSS reductions. MinerU results include improvements in both projects. The shared pipeline excludes model computation; excluding the extreme dense-table sample, its speedup is 2.87×.
The non-PDF optimization report records the original-to-final comparison, per-format timings, memory checks and remaining hotspots.
Quick start
Requires GIL-enabled CPython 3.11–3.14, pypdfium2 5.13.0 or newer, and ONNX Runtime 1.24.4 or newer (DirectML on Windows x64).
On macOS, installation requires Apple Silicon and macOS 14 or newer; Intel Macs are no longer supported as of 0.6.0.
Version 0.6 keeps the Python SDK and CLI and requires its bundled Rust native extension.
Releases contain ABI3 wheels for Linux x86_64/aarch64 (glibc 2.28+), Windows x86_64/ARM64,
and macOS arm64. Pure Python wheels and source distributions are no longer published.
PyPy and free-threaded Python are not supported. Starting with 0.6.1, DocVortex ignores the retired
DOCVORTEX_BUILD_NATIVE and DOCVORTEX_COMPUTE_BACKEND variables, regardless of their values.
The 0.6.0 package still rejects these variables.
Existing 0.5 installations can stay on docvortex<0.6 while migrating.
Replace report.pdf with a local file in any supported input format.
Use --format to choose the output; run docvortex convert --help for options.
The root-level --log-level option controls loguru output and defaults to info.
It must precede the command; DOCVORTEX_LOG_LEVEL=warning can also configure it.
Python
Parse a document once and export it twice:
import docvortex
result = docvortex.parse("report.pdf")
result.export("output/report.md", output_format="markdown")
result.export("output/report.docx", output_format="docx")
The result owns its document structure and assets, so further exports do not
reopen or reparse the source. Existing output files are protected by default;
use overwrite=True in Python or --overwrite in the CLI to replace them.
Supported formats
Native inputs · 20 formats
Document family
File extensions
PDF with native text or scanned pages
.pdf
Word & rich text
.doc, .docx, .rtf
Presentations
.ppt, .pptx
Spreadsheets
.xls, .xlsx, .csv, .tsv
OpenDocument
.odt, .ods, .odp
E-books
.epub
Web documents
.html, .htm, .shtml
Web archives
.mhtml, .mht
Open Fixed-layout Document
.ofd
Outputs · 7 formats
Output
--format / output_format
Markdown
markdown
HTML
html
LaTeX
latex
Word document
docx
EPUB e-book
epub
PDF
pdf
Structured JSON
structured_content
PPT/PPTX and XLS/XLSX are input formats only. Structured JSON is an export
format; the document JSON protocol
separately defines the analysis and intermediate representations.
Save now, export later
A Bundle packages the parsed document and its image assets for reuse across
processes or machines. Load it whenever you need another output format:
The restored result works without the original file. See the
usage guide
for Bundle contents, asset handling and overwrite rules.
Need only the title, authors or other source properties?
docvortex.extract_metadata()
reads metadata without parsing the document body.
Choose the right workflow
PDF parsing defaults to pdf_structure="auto", which uses available Tagged PDF semantics and reading order, with Flash rules for uncovered content. pdf_structure="off" selects geometric parsing. The CLI accepts --pdf-structure auto|off. Original roles and block associations are recorded in docvortex_pdf_structure extensions. Tagged PDF usage
PDF classification under parse_mode="auto" first accepts sufficient structure evidence, then classifies the selected pages as a whole when needed. A txt result uses native parsing. An ocr result raises DocumentError with code pdf_ocr_unsupported and a MinerU download link. parse_mode="txt" forces native parsing. The CLI accepts --parse-mode auto|txt|ocr for PDF input.
PDF OCR:parse_mode="ocr" and --parse-mode ocr are retained for compatibility and always report pdf_ocr_unsupported for PDF input. Download and install MinerU for OCR. DocVortex does not install or invoke MinerU automatically.
Mixed PDFs: auto mode does not classify or switch backends per page. A selection classified as txt keeps native parsing even if it contains scanned pages. Use MinerU when those pages need OCR.
PDF classification:docvortex classify report.pdf returns txt or ocr without inference or networking. Metadata extraction and the low-level PdfModel.predict() native text API also remain offline.
PDF export: PDF sources with page geometry default to block layout restoration, with selectable text and HTML-based tables; charts retain region images. Other sources and older results use semantic reflow. Use --pdf-layout original|reflow to select explicitly; fonts, line breaks and drawing instructions are not reproduced losslessly. See PDF output layout.
See Repository architecture for directory responsibilities,
the Python/Rust boundary, and native development commands. Source builds require the
Rust toolchain pinned in rust-toolchain.toml and the platform's C/C++ linker.
From a local checkout:
uv venv
uv pip install -e ".[test,dev]"
uv run --no-project python -m pytest -q
uv run --no-project ruff check src
uv run --no-project ruff format --check src
uv build --wheel
Bug reports and contributions are welcome. When reporting a parsing issue,
include a reproducible command and a sample document you can share in
GitHub Issues.
License
DocVortex project code is released under the
MIT License.
Alternatives
Use instead of docvortex: tools that do the same job, closest first.
Fast, local document-to-Markdown for LLMs and RAG: docling in Rust, with docling's, MarkItDown's, Marker's and MinerU's Python APIs. PDF (layout, tables, OCR), DOCX, PPTX, XLSX, HTML, EPUB, email and more.
High-performance document intelligence library for Python. Extract text, metadata, and structured data from PDFs, Office documents, images, and 88+ formats. Powered by Rust core for 10-50x speed improvements.
The fastest Python PDF library — 0.8ms mean, 5× faster than the industry leaders, 100% pass rate on 3,830 real-world PDFs. Text extraction, Markdown/HTML conversion, PDF creation and editing.