Linux Blog

Office 2007 docx to ODF Conversion

Filed under: Linux Software — at 10:38 pm on Monday, September 29, 2008

I was going to write an article on how to open docx’s and other Office 2007 documents but there are numerous articles out there explaining how to do this on many distributions. They all basically say the same thing, you download the file, extract it and put it in your open office directory. Normally there are a couple of files but the on we are interested in is the main binary. What some people don’t know is that if you want to just quickly open or convert a document you can do so by using the odfconverter binary.

Once you extract the files just try running the binary:

[owen@TheLinuxBlog.Com files]$ ./OdfConverter
Error when parsing command line: Input is missing
Usage: OdfConverterTest.exe /I PathOrFilename [/O PathOrFilename] [/BATCH-ODT] [/BATCH-DOCX] [/V] [/OPEN] [/XSLT Path] [/NOPACKAGING] [/SKIP name] [/REPORT Filename] [/LEVEL Level]
Where options are:
/I PathOrFilename  Name of the file to transform (or input folder in case of batch conversion)
/O PathOrFilename  Name of the output file (or output folder)
/F                 Replace existing file
/BATCH-ODT         Do a batch conversion over every ODT file in the input folder (note: existing files will be replaced)
/BATCH-DOCX        Do a batch conversion over every DOCX file in the input folder (note: existing files will be replaced)
/V                 Validate the result of the transformation against the schemas
/OPEN              Try to open the converted files (works only for ODF->OOX, Microsoft Word required)
/XSLT Path         Path to a folder containing XSLT files (must be the same as used in the lib)
/NOPACKAGING       Don't package the result of the transformation into a ZIP archive (produce raw XML)
/SKIP name         Skip a post-processing (provide the post-processor's name)
/REPORT Filename   Name of the report file that must be generated (existing files will be replaced)
/LEVEL Level       Level of reporting: 1=DEBUG, 2=INFO, 3=WARNING, 4=ERROR
/ODT2DOCX          Force conversion to DOCX regardless of input file extension
/DOCX2ODT          Force conversion to ODT regardless of input file extension
[owen@TheLinuxBlog.Com files]$

As you can see, there are some decent options with this plugin. It does a pretty good job of converting the malicious documents but some times some objects will not work.

Random Man Pages:

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>