Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnotes unreadable content #364

Closed
cperez87 opened this issue May 22, 2020 · 2 comments
Closed

Footnotes unreadable content #364

cperez87 opened this issue May 22, 2020 · 2 comments

Comments

@cperez87
Copy link

cperez87 commented May 22, 2020

NPOI doesnt seem to be saving file with footnotes correctly.
When I try to open the file after saving Word says "Word found unreadable content in ***.docx...."

I created a simple docx with one word and assigned a footnote to it.
I want to open this file, edit it, and save it as a new file.

For simplicity, im only doing Open and Save-As here.

var fis = new FileStream("simple_footnote.docx", FileMode.Open);
var doc = new XWPFDocument(fis);
using (FileStream sw = new FileStream("simple_footnote_2.docx", FileMode.Create))
{
     doc.Write(sw);
}

Just with this code simple_footnote_2.docx is saved invalid.
Is there anything that can be done. Aside from creating a different file with no footnotes.

Thank you

@tonyqus
Copy link
Member

tonyqus commented Jun 1, 2020

duplicate with #367

@tonyqus tonyqus closed this as completed Jul 4, 2020
@tonyqus tonyqus reopened this Jul 4, 2020
@tonyqus
Copy link
Member

tonyqus commented Jul 4, 2020

Can you provide the original simple_footnote_2.docx? I need testing my fix

@tonyqus tonyqus self-assigned this Jul 4, 2020
@tonyqus tonyqus closed this as completed in 5df162f Jul 4, 2020
@tonyqus tonyqus added the docx label Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants