LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can convert MSOffice .xml files to .pdf? (https://www.linuxquestions.org/questions/linux-software-2/how-can-convert-msoffice-xml-files-to-pdf-924876/)

Felipe 01-20-2012 06:31 PM

How can convert MSOffice .xml files to .pdf?
 
Hallo:

I've lots of files generated with MSOffice in .xml format.

I want to convert them to .pdf.

What I do:
file.xml -->import in MSOffice and export to-->file.doc -->run doc2pdf file.doc --> I get file.pdf

The problem is that I have to use MSOffice to convert the file to .doc and I try to do if with scripts in Linux.

Is there any way to convert MSOffice .xml files directly in Linux?

Thanks

Ion Silverbolt 01-20-2012 07:11 PM

I think xml2doc does it, but I have never used it so I can't verify its quality.

From the xml2doc page:
Quote:

xml2doc is an xml files processor tool, that allows you to write documents in a simple XML way and then output them in various formats (pdf,html,txt,manpage,...). In first term is intended to be a lightweight version of DocBook, but smaller (20KB against 100MB), faster, easy to learn, and very flexible.
The program should be in your package manager as xml2doc.

http://xml2doc.sourceforge.net/

jefro 01-20-2012 08:55 PM

Might also be able to use openoffice just as you would msoffice.

John VV 01-20-2012 10:54 PM

getting MS office to run in wine ??????
might be better off using Libreoffice

Felipe 01-21-2012 08:00 AM

Thanks for the reply.

About the suggestions:

- xml2doc: When I try to use it, it says:
Isn't a xmldoc document (is <wordDocument>)

- I use OpenOffice/LibreOffice- I need to convert the file from command line. And the .xml document doen't include the DTD and style, so even OpenOffice doesn't open it in right way (Is imported as .txt so images are not displayed and style lost).

- Using MSOffice with wine. I supponse will not solve my problem as need to convert from command line.

So I think what I need a .xml wordDocument converter.

Does any know if there is any for Linux?

Thanks

gradinaruvasile 01-22-2012 08:04 AM

http://news.oreilly.com/2008/08/impo...ts-into-w.html

?

Felipe 01-23-2012 03:09 AM

Thanks for the reply. Interesting, but go on with the problem.

I've thousands of files to convert and need a command line converter. Supponse can be done programming a xml converter, but would like to know if someone has already solved the problem.

I've seen some online converters, but don't work fine (they don't import the images).

I need to convert the .xml (with images included in the same file) to .pdf.

Regards.


All times are GMT -5. The time now is 11:42 AM.