Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Word document to XSL-FO

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?

like image 865
Thunder Avatar asked Sep 17 '10 10:09

Thunder


3 Answers

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)

like image 98
Mads Hansen Avatar answered Oct 23 '22 03:10

Mads Hansen


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)

like image 30
JasonPlutext Avatar answered Oct 23 '22 03:10

JasonPlutext


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

like image 30
Phil Avatar answered Oct 23 '22 02:10

Phil