[英]How to convert DOCX to ODT format using javascript?
I am working on a in-website document editor(word and excel document).我正在开发网站内文档编辑器(word 和 excel 文档)。 So far I am able to edit ODT files using WEBODF .
到目前为止,我能够使用WEBODF编辑 ODT 文件。 Is there any way to convert DOCX file to ODT using javascript so that i can use the file in the editor?
有什么方法可以使用 javascript 将 DOCX 文件转换为 ODT,以便我可以在编辑器中使用该文件? any alternatives for editing word and excel documents inside a website?
在网站内编辑 word 和 excel 文档的任何替代方法? I have tried saving the file in OneDrive and then using the share link to open editing on sharepoint but this editor cannot be inserted inside an website and can only be done in a new tab?
我曾尝试将文件保存在 OneDrive 中,然后使用共享链接在 sharepoint 上打开编辑,但此编辑器无法插入网站内,只能在新选项卡中完成? i need the editor inside the website as i need to implement azure versioning of the documents
我需要网站内的编辑器,因为我需要实现文档的 azure 版本控制
WebODF is an awesome tool to be used as an online editor. WebODF 是一个很棒的工具,可以用作在线编辑器。 Assuming you have no restrictions implementing a separate backend server, you can use libreoffice, which gives you a command line utility to exactly perform that job.
假设您没有限制实施单独的后端服务器,您可以使用 libreoffice,它为您提供了一个命令行实用程序来准确执行该工作。 You can convert docx file to odt file using the following command -
您可以使用以下命令将 docx 文件转换为 odt 文件 -
soffice --headless --convert-to odt <input file>.docx
The approach would be to create an API该方法是创建一个 API
To take care of restricted cross origin policy, you can implement AJAX calls in the front-end to perform file uploading and viewing operations using Javascript blobs.为了处理受限的跨源策略,您可以在前端实现 AJAX 调用,以使用 Javascript blob 执行文件上传和查看操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.