skillfed

pdf2docx

Open source Python library converting pdf to docx.

pdf2docx v0.5.13 1.2M downloads/30d#4,297 on PyPI
Permissive license MIT Active released

What it is and what it does

pdf2docx is a Python library that converts PDF documents into editable Word (.docx) files. It uses PyMuPDF for PDF parsing and python-docx for document generation, with additional support for table extraction and layout analysis via opencv-python-headless and numpy. The library provides both programmatic and command-line interfaces for conversion tasks.

The project was originally maintained by Artifex but is now community-driven under the MIT license. It depends on several image processing and document manipulation libraries to reconstruct PDF content as structured Word documents. Users should be aware that active maintenance has transitioned to the community, and the description suggests considering PyMuPDF directly for more comprehensive PDF processing needs.

Use it for:

  • Convert scanned or digital PDFs to editable Word documents for further editing
  • Extract tables from PDF reports and import them into Word format
  • Batch-convert multiple PDFs to .docx for document management workflows
  • Automate PDF-to-Word conversion in document processing pipelines

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts PDF files to Word documents (.docx format), with support for extracting tables and preserving layout and formatting.

Yes, with conditions. The library is straightforward to install and suitable for basic PDF-to-Word conversion tasks. However, be aware that active maintenance has ended and the project is now community-supported. If you need robust, actively-maintained PDF handling, the description recommends PyMuPDF as an alternative. No known security vulnerabilities are reported.

Install

pdf2docx on PyPI

pip

pip install pdf2docx

uv

uv add pdf2docx

poetry

poetry add pdf2docx

Installing pdf2docx

Before you install

Low friction installation with a pure-Python wheel. Maintenance is active, though the project description notes it is no longer actively maintained by Artifex and relies on community contributions.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install pdf2docx

from pdf2docx import Converter

converter = Converter('input.pdf')
converter.convert('output.docx')
converter.close()

Requires Python >= 3.10. opencv-python-headless requires a system with image processing libraries available.

Verify before relying

  • Conversion quality and accuracy across different PDF types and layouts
  • Performance characteristics on large or complex PDF documents
  • Extent of table extraction accuracy and edge-case handling

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — PyMuPDF, python-docx, fonttools, numpy, opencv-python-headless, fire
Maintenance actively maintained — 105 days since the last release
First released
Downloads 1,151,092/month — #4,297 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pdf2docx-0.5.13-py3-none-any.whl

Keywords: pdf-to-word, pdf-to-docx

Tags

pdf to docx conversionpdf to word pythonextract pdf to documentpdf table extractionbatch pdf conversionpdf layout preservation
document-conversionpdf-processing

More Text Processing packages