File corruption likely due to duplicate image IDs in document
See original GitHub issueHi guys,
First of all, I don’t think this is actually any issue with the package at all, but have a strange scenario…
We have 2 separate document templates, both of them should be pulling in the same set of images (using IMAGE
tag)-
but in 1 document, the file is perfect, the other always shows the error in Word that the document is corrupted. After letting Word recover it, the document all looks perfect.
So, there seems to be something else in the template that is causing an issue, but, only when the images are inserted (no matter where the image is inserted within the template & no matter what URL is provided). Both documents use the same set of URL’s, the same image dimensions & the same additionalJSContext
function called - so I know it works & has worked for many other templates.
Being that it is hard to even reproduce the issue (unfortunately I can’t share the template with you in entirety, as it belongs to our customer), I am really just wondering if there are any methods you may know that can help locate the source of the corruption in the document?
Word just magically resolves the issue, but without indication of what it did to fix it & looking at the XML hasn’t helped, as I don’t really know what I am looking for.
I tried a Microsoft SDK that was suggested online, but I have little/no idea when it comes to .net & I couldn’t get it to read the file (probably because I am on Mac), plus I am not really sure if it would have provided the answer for this issue.
Happy for you to just close this off, if there is nothing that comes to mind. Thanks 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Hmmm this issue comes to mind #144 .
Also, have you tried saving the offending template again in the newest version of Word? Maybe edit it a bit to ensure Word actually parses and serialises it again. That way it may clean up some of the offending xml. Just a shot in the dark.
Should be fixed in v4.6.2. Will be published to NPM shortly.