How can I convert docx or wordml xml files to xsl-fo?

泄露秘密 提交于 2019-12-22 14:47:26

问题


I've been looking for a method to convert docx or wordml xml to xsl-fo.

I read this post:

What is the best XSLT engine for Perl?

but I'm having exceptional problems getting apache-fop going.

I was able to download the bins and run it locally but the formatting was a little off and it didn't maintain the headers and footers or section 1 or section 3 (17 page doc 3 sections).

It also overlapped the text over the outline numbers and did not maintain the font used.

Trying a more simple test caused fop to fail completely.

I would like to find a way to create a PDF that is at least close to 100% accurate reproduction of the original doc.


回答1:


I'm not sure about the xsl.fo, but I've had good experiences with PDFCreator for turning Microsoft documents to PDF, on Windows. It acts as a printer driver, so I'd guess there would be a way to automatically invoke it using COM bridges from Perl, if you're hosting your webserver on Windows (or perhaps with Wine?).



来源:https://stackoverflow.com/questions/380139/how-can-i-convert-docx-or-wordml-xml-files-to-xsl-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!