skillfed

docx2pdf

Convert docx to pdf on Windows or macOS directly using Microsoft Word (must be installed).

docx2pdf v0.1.8 932.6K downloads/30d#4,699 on PyPI602
Permissive license MIT AGING released

What it is and what it does

docx2pdf is a lightweight automation wrapper that converts Microsoft Word DOCX files to PDF by delegating to Word itself rather than reimplementing document rendering. On Windows it uses win32com to drive Word via COM, and on macOS it uses AppleScript (JXA) to control Word through native OS automation. The package works both as a command-line tool and as a Python library, supporting single-file conversion, batch folder conversion, and explicit output path specification.

Because it relies on Word's own PDF export rather than a document parser, it preserves formatting, fonts, and complex layouts accurately. The trade-off is a hard dependency on having Microsoft Word installed on the conversion machine—it cannot work in headless environments or on systems without Word. The package is aging (last release December 2021) and shows no recent maintenance activity, though it remains stable for its narrow use case.

Use it for:

  • Batch convert folders of DOCX files to PDF on a Windows or macOS workstation where Word is already installed.
  • Automate DOCX-to-PDF conversion in Python scripts or Jupyter notebooks without implementing document parsing.
  • Preserve complex Word formatting (styles, embedded objects, fonts) that simpler converters might lose or misrender.
  • Command-line bulk conversion of DOCX files with optional output directory specification.

Worth the install?

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

Converts DOCX files to PDF on Windows or macOS by automating Microsoft Word through native OS APIs (win32com on Windows, AppleScript on macOS).

Yes, if you have Microsoft Word installed on Windows or macOS and need reliable DOCX-to-PDF conversion with formatting preservation. The low install friction and permissive MIT license make it straightforward to try. However, the aging maintenance status (last release December 2021, no recent commits) means you should verify compatibility with your current Word version before relying on it in production. Not suitable for headless or server-side conversion.

Install

docx2pdf on PyPI

pip

pip install docx2pdf

uv

uv add docx2pdf

poetry

poetry add docx2pdf

Installing docx2pdf

Before you install

Low install friction with a pure-Python wheel. Maintenance is aging—last release was 2021-12-11 and the repository shows no recent activity despite 602 stars—but the package remains archived-free and dependencies are stable.

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 docx2pdf

from docx2pdf import convert
convert("input.docx")
convert("input.docx", "output.pdf")
convert("my_docx_folder/")

Microsoft Word must be installed on the target system (Windows or macOS); the package is a thin automation wrapper around Word's native conversion capability.

Verify before relying

  • Whether the package works reliably with recent versions of Microsoft Word on Windows and macOS.
  • Whether tqdm progress bar rendering in Jupyter requires ipywidgets as stated in the description or if it's optional.
  • Current state of pywin32 and appscript dependencies and their compatibility with modern OS versions.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies 4 — pywin32, tqdm, importlib_metadata, appscript
Maintenance aging — 1,707 days since the last release
Last repo commit
First released
Downloads 932,618/month — #4,699 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: docx2pdf-0.1.8-py3-none-any.whl

Environment :: MacOS XEnvironment :: Win32 (MS Windows)License :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Office/Business :: Office SuitesTopic :: Software Development :: Libraries

Tags

docx to pdf conversionword document to pdfbatch convert docx filesautomated word to pdfdocx pdf converter windows mac
document-conversionoffice-automation

More Libraries packages