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.0a10 (2018-07-18)
Add console script command to compose two or more word files. [deiferni]
1.0.0a9 (2018-05-01)
Fix error in mapping of num_ids introduced in 1.0.0.a7. [buchi]
Do not fail when numbering zero is referenced. [deiferni]
1.0.0a8 (2018-04-26)
Only attempt to set the nsid when it is available. [deiferni]
1.0.0a7 (2018-04-20)
Fix handling of images in WordprocessingGroups (<wpg:wpg>). [buchi]
Fix handling of shapes in shape groups (<v:group>). [buchi]
Fix handling of numberings, avoid inserting multiple numbering properties. [buchi]
Fix renumbering of bookmarks. [buchi]
Renumber ids of drawing object properties (<wp:docPr>). [buchi]
1.0.0a6 (2018-02-20)
Do not restart numbering of bullets. [buchi]
1.0.0a5 (2018-01-11)
Renumber bookmarks to avoid duplicate ids. [buchi]
Add support for shapes. [buchi]
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.