Posted By: pwzeus | Apr 30th, 2008 @ 8:08 AM
page 1 of 1
Comments: 4 | Views: 770
I have a project where we are generating word document using WORD-ML.  At this point client also wants to have document generated in PDF. For this I need to convert my WORD-ML into FO-XML. Do anyone know how I can do this. I can not write FO-XML from scratch at this point. I just need a tool or some process which can convert my WORD-ML to FO-XML.

Thanks.
Olmstead
Olmstead
Guess what?! I got a fever, and the only prescription... is more cowbell!
Working on a similar project and considered going the XSL:FO route... there are some places that sell an XSLT doc that will perform the transform for you... which is a pretty elegant solution...

http://www.antennahouse.com/product/wordmltofo.htm

and some that offer server side "engines" to do it...

http://www.ecrion.com/Products/XFRenderingServer/Overview.aspx

We decided to go with the Aspose components... Aspose.Words and Aspose.Pdf...

We construct the WordML inside of a DocX, load the DocX using Aspose.Words, save it using a proprietary Aspose PDF XML format, and load it using the Aspose.Pdf libs...

Its kinda round'about but the libs work very nicely, and preserve all of the non-textual content, images, etc...


//Edit

here is the alternative we considered before the Aspose solution...

http://alt-soft.com/Products_xml2pdf.aspx

worked out to be about the same price...

also, the antennahouse XSLT is the cheapest, and is platform independent... but the added features of the 3rd party component are fun when someone else is footing the bill Wink

Two weeks ago I implemented a converter for WordML to a HTML-ish dialect used by a CMS that I maintain for a couple of customers. It took me no more than 40 hours to build a converter complete with a WPF front-end. It should not be that hard to create a converter for WordML to FO-XML.

So depending on the price of the other solutions you can still consider building a converter yourself.

EDIT: This is the Office OpenXML solution by the way, previous versions of word may be harder to convert, because the format is quite different.

Programatic with java:

import officetools.OfficeFile; // available at dancrintea.ro/doc-to-pdf/
...
FileInputStream fis = new FileInputStream(new File("test.doc")); // works with xls also
FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");

All possible conversions:
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
html --> pdf
page 1 of 1
Comments: 4 | Views: 770
Microsoft Communities