Convert Word document to XSL-FO
Solution 1
RenderX has a set of freely available XSLT Stylesheets for converting Microsoft's WordprocessingML documents to XSL FO (XSLFO)
These publicly available stylesheets can be used to convert Microsoft's WordprocessingML documents to XSL FO (XSLFO)
You don't have to use the generated XSL-FO with RenderX. You can run them to produce XSL-FO output and render in any XSL-FO engine (to include Apache FOP).
Antennahouse also has a WordMLToFO Stylesheet, but it is not free ($200)
Solution 2
docx4j uses FOP to create pdfs from docx.
The XSLT is in here, but you may prefer to start with this webapp, which can emit XSLFO from an uploaded docx.
It uses extension functions to do the heavy lifing, so it only really works as part of docx4j, but that's readily availableand ASLv2 licensed.
Yes, RenderX have their http://www.renderx.com/tools/word2fo.html but the licence is restrictive, and the 20070227 version is directed at Word 2003 WordML (maybe there is a newer one? its been a while since i looked)
Solution 3
Word can do it on it's own. Here are Microsoft's instructions: http://msdn.microsoft.com/en-us/library/office/aa537167%28v=office.11%29.aspx#officewordwordmltoxsl-fo_creatinganxslfodocumentfromword
Here is the download link for the required XSL - Word2FO.xsl: http://www.microsoft.com/en-us/download/details.aspx?id=16876
Comments
-
Thunder almost 2 years
I am using Microsoft Word 2007. I would like to convert the Word document to XSL-FO. There are some hints on the net, but only for RenderX. Is there such a tool for Apache FOP?
-
chiborg almost 14 yearsXSL-FO is pretty standardized, and apart form some table stuff FOP should render it ok. Do you get error messages when trying to render the XSL-FO with Apache FOP?
-
Dimitre Novatchev almost 14 yearsIn case you intend to use xsl-fo to produce pdf output, be aware that word 2007 and word2010 have the capability to "save as..." pdf.
-
-
hardywang almost 11 yearsRenderX ix quite expensive renderx.com/files/documents/RenderX_Published_Price_List.pdf
-
Mads Hansen almost 11 yearsThat may be the case, but the stylesheets are free
-
hardywang almost 11 yearsI downloaded the stylesheets, but it looks like to support Word 2003 version only?
-
hardywang almost 11 yearsHow do I apply the XSLT to a Word document? It internally contains several Xml files, which one I should use?
-
MGM almost 10 yearsIt's a very limited solution for Word 2003, not OpenXML. :(