Search code examples
pythonxmlpdf-generationdocxpython-docx

How to create .docx writer from scratch with Python?


My end goal is to create a very basic docx writer from scratch, as I am unhappy with the current python library offerings.

Can someone point me to some good references, or how to get started with a very stripped down "create your own" docx writer that can simply create a text box and write to a docx file.

Note, I am not asking for library recommendations. I want to implement my own tool.


Solution

  • I won´t be an easy task, specially if you want to start from scratch, you may get an idea here

    https://docs.fileformat.com/word-processing/docx/

    You may want to read the DOCX standard directly from Microsoft

    https://interoperability.blob.core.windows.net/files/MS-DOCX/%5bMS-DOCX%5d.pdf

    And the OpenOffice documentation

    http://officeopenxml.com/anatomyofOOXML.php