sandrods/odf-report

odf files that generated by odf-report v0.7.0 be recognized as "broken file" in Microsoft Word

Closed this issue · 3 comments

Before odf-report v0.7.0, odf-report generated file be recognized as correct file in Microsoft Word, but now be recognized as "broken file".
I checked difference of generated odt files that between v0.6.1 and v0.7.0. There was difference of META-INF/manifest.xml.

$ diff -r odf-report-0.6.1 odf-report-0.7.0
diff -r odf-report-0.6.1/META-INF/manifest.xml odf-report-0.7.0/META-INF/manifest.xml
1,2c1,2
< <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< <manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"><manifest:file-entry manifest:full-path="/" manifest:media-type="application/vnd.oasis.opendocument.text"/><manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/></manifest:manifest>
\ No newline at end of file
---
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"><manifest:file-entry manifest:full-path="/" manifest:media-type="application/vnd.oasis.opendocument.text"/><manifest:file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="settings.xml" manifest:media-type="text/xml"/><manifest:file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/></manifest:manifest> 

It seems that cause of that newline.

This newlined added by 96a2173 . Is this an intentional? Thanks!

Nope. No intentional. This must by a side-effect of having to edit the menifest to include the images added by tables and sections rendering.

I'll take a look. Are you able to confirm that the newline is actually the cause. Could you edit (unzip) the odt, change the xml and see if it solves the problem?

I checked with the edited(removed the newline at end of file) odt file with Microsoft Word and confirmed that recognized as a correct file.
(I guess Microsoft Word expects CR for a newline.)

Good! That should be easy to fix, I'll take a look ASAP