Skip to content

Conversation

WaKeMaTTa
Copy link
Contributor

Fixes #103


document = @zip.find_entry('word/document.xml')
document ||= @zip.find_entry('word/document2.xml')
document = @zip.glob('word/document*.xml').first
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the specification of Office Open XML file format.
Is there no docx file which have some xml files with prefix 'word/document'?
The PR #73 tries to deal with all the xml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specifications can be found here: http://officeopenxml.com/anatomyofOOXML.php


If we want to be more clean, we should load [Content_Types].xml and check the name of the document.

I will work on a new PR that will use [Content_Types].xml to define all XML.

@satoryu satoryu merged commit ff957f0 into ruby-docx:master May 5, 2021
@WaKeMaTTa WaKeMaTTa deleted the patch-1 branch May 22, 2021 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENOENT error because internal doc is word/document22.xml
2 participants