Skip to main content

fancydocx

Convert fancy, design-heavy Word (.docx) files into a single, self-contained HTML file, with all styling, images and fonts inlined. It is a from-scratch reader for the Office Open XML format, written in pure Python. No LibreOffice, no Word, and no third-party dependencies.

Features

  • Tables, columns, shapes, text boxes and floating images
  • Theme colours, fonts and the full paragraph/run style cascade
  • Bullet and numbered lists, hyperlinks, headers and footers
  • Embedded fonts are recovered and inlined automatically
  • Batch conversion from a simple command-line tool

Installation

pip install fancydocx

Usage

In Python:

import fancydocx

fancydocx.convert("resume.docx", "resume.html")   # write a file
html = fancydocx.convert("resume.docx")           # or return a string

From the command line:

fancydocx resume.docx -o resume.html
fancydocx ./documents -o ./html --workers 8       # convert a folder

Requirements

Python 3.8 or newer. The library uses only the standard library.

Notes

  • Text renders with the document's own fonts when they are installed on the viewer's machine; pass --embed-fonts to inline them for portability.
  • EMF/WMF vector images are shown as placeholders, as browsers cannot display them.

License

MIT. See the LICENSE file.

Metadata

Release files for fancydocx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fancydocx 0.1.0
File Size Uploaded
fancydocx-0.1.0.tar.gz 46.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fancydocx 0.1.0
File Interpreter ABI Platform
fancydocx-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.0 kB

Release files / fancydocx-0.1.0.tar.gz

Download URL fancydocx-0.1.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bef03ca827407998259e22e4465d6e6f291eaf86e75a09a81d43b4367503eae7
BLAKE2b-256 checksum
How to use checksums
7f063f41d20c1e34cf73e8458c748c40d8eb6716e3e5ddd6fb217afb6ed34816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / fancydocx-0.1.0-py3-none-any.whl

Download URL fancydocx-0.1.0-py3-none-any.whl
Size 48.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2de43beb898a36979dff8375d8476a78c2b5d6500504051bc3e311c3157bbea
BLAKE2b-256 checksum
How to use checksums
5435494423fb9fddee69ec23e16115a227cc18289623bf1b3268d4fcb75a860a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page