Skip to content

Generated docx document.xml structure differs from Word - rendering Google Drive uploads incompatible #2712

@gen3vra

Description

@gen3vra

If you export a simple table document with this library and attempt to upload it, it will be completely mangled. This can be fixed by changing literally anything and saving it in Word, thereby 'replacing' the document structure with a freshly saved Word generated one.

The problem lies in the document.xml structure. In other words, renaming both documents to .zip and extracting both, then replacing the 'broken' file's document.xml with the 'fixed' one will fix the broken one too.

The document.xml structure of the broken one
https://pastebin.com/raw/kaa3Erq5

The document.xml structure of the fixed one
https://pastebin.com/raw/mHn2QPK9

Here's an example of the broken docx upload
broken.docx
broken

And what it should look like after making a small edit (changing 'Test Text' -> 'Test Text (edit)'
fixed.docx
fixed

I'm unsure how to make default exported documents compatible with Google Drive from the get-go or what's causing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions