开发者

MS Word to Stylesheet

开发者 https://www.devze.com 2023-01-04 02:36 出处:网络
Is there an easy way to automatically convert a bunch of MS Word documents to xslt stylesheets that can be displayed in the browser?

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,开发者_StackOverflow社区 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消