简体   繁体   English

如何将整个页面转换为docx?

[英]How to convert whole page to docx?

I have a task of creating a sort of form that needs to be downloadable.我的任务是创建一种需要可下载的表单。 I am using reactjs to render a html page, and now i need a way to convert that page to .docx file.我正在使用 reactjs 来呈现一个 html 页面,现在我需要一种将该页面转换为 .docx 文件的方法。 Any ideas?有任何想法吗? If you also have some easy way of converting page to pdf, that would be great as well, but i can already do that, albeit via long process, so my primary goal is docx.如果您也有一些将页面转换为 pdf 的简单方法,那也很好,但我已经可以做到了,尽管过程很长,所以我的主要目标是 docx。

There is a library named redox which may be useful for your situation.有一个名为redox的库,它可能对您的情况有用。 It explained itself as:它自己解释为:

redocx is a library which lets you create word documents with React. redocx是一个可以让你用 React 创建 word 文档的库。 It provides a set of components which renders your declarative views and components to word documents.它提供了一组组件,可将您的声明性视图和组件呈现为 Word 文档。

View on GitHub在 GitHub 上查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM