Hello everyone,
I'm currently working on a Node.js project where I need to convert .docx files to Syncfusion's SFDT format using the Syncfusion Document Editor. I would also like to reverse the process, converting from SFDT back to .docx.
Does anyone happen to have experience with this, or can you provide a simple example showing how to achieve these conversions?
I've looked through the official Syncfusion documentation but have yet to find a clear example that fits my needs. Any help or pointers in the right direction would be greatly appreciated.
I really appreciate any help you can provide.
Hi Marcos,
Document editor requires server-side interactions for the below operations.
You can deploy web APIs for server-side dependencies of Document Editor component in the following platforms only not in NodeJs.
Workaround solution: we have created the sample in node.js. In this sample, we have accessed our ASP.NET core web service APIs to convert the docx document to SFDT and sfdt to docx.
Please refer to the below UG to know about our supported platforms for the backend.
Web services in EJ2 JavaScript Document editor control | Syncfusion
Hi Umer,
We were unable to reproduce the reported issue. We have attached a video for your reference. Please cross-check that and let us know if there are any other issues or if you need further assistance.
Regards,
Dhanush S
Got it. Thanks Dhanush.
One more question. How do I feed this sfdt string that I got after conversion to my react document editor client side and open the document there?
Hi Umer,
You have successfully converted the Word document into SFDT using Node.js with the demo service URL. As previously mentioned, the Document Editor requires server-side interactions for the following operations:
- Opening file formats other than SFDT
- Pasting with formatting
- Restricting editing
- Spell checking
- Saving as file formats other than SFDT and DOCX
For these additional services, a server-side dependency is necessary. Therefore, implementing them with Node.js and the demo service URL is not a viable solution. You will need a server to make web API calls for these services. The service URL provided is intended for demonstration purposes only; you will need to host your own web service for development.
Demo Service URL:
| https://services.syncfusion.com/js/production/api/documenteditor/ |
Please refer to the below UG to know about our supported platforms for the backend.
Web services in EJ2 JavaScript Document editor control | Syncfusion
Regards,
Dhanush S