Skip to main content

Compose .docx documents

Project description

docxcompose is a Python library for concatenating/appending Microsoft Word (.docx) files.

Example usage

Append a document to another document:

from docxcompose.composer import Composer
from docx import Document
master = Document("master.docx")
composer = Composer(master)
doc1 = Document("doc1.docx")
composer.append(doc1)
composer.save("combined.docx")

Changelog

1.0.0a4 (2017-12-27)

  • Fix handling of styles when composing documents with different languages. [buchi]

  • Also add numberings referenced in styles. [buchi]

  • Avoid having multiple <w:abstractNum> elements for the same style. [buchi]

  • Restart first numbering of inserted documents [buchi]

  • Add support for anchored images. [buchi]

  • Handle referenced style ids that are not defined in styles.xml [buchi]

  • Remove header and footer references in paragraph properties. [buchi]

1.0.0a3 (2017-11-22)

  • Make removal of property fields optional. [buchi]

1.0.0a2 (2017-11-06)

  • Fix handling of footnotes containing hyperlinks. [buchi]

  • Add functionality to deal with custom document properties. Properties can be updated and fields containing properties can be removed. When appending or inserting documents their custom document properties get removed automatically. [buchi]

1.0.0a1 (2017-09-13)

  • Initial release [buchi]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docxcompose-1.0.0a4.zip (14.2 kB view details)

Uploaded Source

File details

Details for the file docxcompose-1.0.0a4.zip.

File metadata

  • Download URL: docxcompose-1.0.0a4.zip
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for docxcompose-1.0.0a4.zip
Algorithm Hash digest
SHA256 fd4da578d111c14f1ab2288e106cd1caa5b2d08e4ac84149ad6d0136818480d3
MD5 3cf5ea6e3abf0546ef12201fdbdec164
BLAKE2b-256 27052fd64bd1432ce83172360e8bd7cee9c5a9ac8b6c8bd15f828f461b14d620

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page