MS Word 到样式表
有没有一种简单的方法可以自动将一堆 MS Word 文档转换为可以在浏览器中显示的 xslt 样式表?
我拥有的是大量 Word 格式的表单,这些表单必须在浏览器中显示,或发送给用户,其中已知字段从数据源填充,由用户编辑,最后打印(包括原始标题)和页脚)。用户输入的数据不需要保存。
我不确定将文档转换为样式表是否可行。也许有人对如何实现这一目标有更好的想法?就我而言,在服务器上安装 Office 不是一个选项。
Is there an easy way to automatically convert a bunch of MS Word documents to xslt stylesheets that can be displayed in the browser?
What I have is a large collection of forms in Word format that have to be displayed in the browser, or sent to the user, with known fields populated from a data source, edited by a user and, finally, printed (including the original headers and footers). The data entered by the user will not need to be saved.
I'm not sure if converting the documents to stylesheets is even feasible. Maybe someone has a better idea of how to achieve this? Installing Office on the server is not an option in my case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用 .docx,我会看看 Word-ML。 Docx 文件基本上是压缩在一起的 XML 文件的集合。
If you are working with .docx, I would have a look into Word-ML. Docx files are basically a collection of XML files zipped together.
我尝试过使用“Flat OPC 包格式”将 docx 表示为单个 XML 文件,然后使用 XSLT 显示该文件。
但最终,我更喜欢使用 CSS 将 docx 转换为 HTML。 docx4j (Java) 注重生成干净的 CSS。
I have experimented with using the "Flat OPC package format" to represent the docx as a single XML file, which is then displayed using XSLT.
But ultimately, I prefer to convert the docx to HTML with CSS. docx4j (Java) makes a point of producing clean CSS.