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

The React DOCX libraries ensure compatibility with Microsoft Word during validation, whereas the HTML/JS browser-based libraries generate files that are not fully valid or compatible with Microsoft Word. #2853

Open
lingaraoakul opened this issue Nov 23, 2024 · 2 comments

Comments

@lingaraoakul
Copy link

When preparing and downloading a DOCX file using two different libraries, we observe the following differences:

React DOCX Libraries: When using the React DOCX library to generate the DOCX file, the document is successfully created and validated in Microsoft Word without any issues, working as expected.

HTML/JS Browser Libraries: While we are able to generate and download the DOCX file using HTML/JS libraries in the browser, the file encounters validation issues when opened in Microsoft Word, resulting in an exception.

In summary, the React DOCX libraries ensure compatibility with Microsoft Word during validation, whereas the HTML/JS browser-based libraries generate files that are not fully valid or compatible with Microsoft Word.

Thank you!

@anti-the-social
Copy link
Contributor

anti-the-social commented Nov 24, 2024

Hello!

Without concrete examples it would be impossible to make any meaningful action on what you are reporting, other than closing an issue after some time. So more concrete steps and code examples for reproduction are welcomed. :)

@lingaraoakul
Copy link
Author

lingaraoakul commented Nov 25, 2024

@anti-the-social

I am using a DOCX file to generate documents, which I then upload into another system that validates the document and convert into HTML using Microsoft Word. However, I am encountering an issue where the document is marked as corrupt, even when I try using a basic example file provided by the docx team (available at this CodePen link is https://codepen.io/dolanmiu/pen/RwNeObg).

I also tried using another file generated with the React Docx library, and it worked as expected. You can find the link to the file generation here: https://stackblitz.com/edit/react-docx?file=index.tsx

I am encountering an issue when using HTML/JS-based DOCX libraries. Could you please assist me in resolving this problem?

Thanks

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

No branches or pull requests

2 participants