Converting Office Documents
Now and then, office-type documents need to be converted. The latex users have always been able to produce a variety of formats from the command line, but for the OpenOffice/LibreOffice users, manual labor has been the solution. That changes with unoconv. Now you can convert to most file formats directly from the command line.
Unoconv is handy for many tasks. I commonly use it to convert all documents in a directory to PDFs, or MS Office compatible formats for clients. The beauty of it is that these previously tedious tasks are now one-liners.
If you're on ubuntu or derivates (I'm on kubuntu) you can install unoconv from the command prompt:
$ sudo apt-get install unoconv
Having done that, you need to start the server half of unoconv.
$ unoconv --listener
Give this a few seconds to settle. It starts an instance of OpenOffice in the background which it ties into. To use this instance of OpenOffice for format conversion, now try the following:
$ unoconv -f pdf *.odp *.odt
This will convert all text documents and presentations to pdfs. There isn't much control in the process, but if you want the standard output, it is a great help.
When it comes to exporting to MS Office formats, you have slightly more control. You can, for instance, target the format doc, doc6 and doc95, meaning Word 97/2000/XP, Word 6.0 and Word 95 respectively.
The project is alive, so there is good hope to have the final glitches sorted out. The tool spits out a couple of scary warnings now and then, but the documents seem to turn out well.
The conversion is based entirely on OpenOffice's conversion, so the quality is what you know from there. Since the conversion is automatic, you might have to limit yourself at times. For instance, I've learned that not using the arrow connectors, but instead relying on lines, helps in odp to ppt conversion. Also, the ppts produced are not compatible with the very latest MS Office on Mac - but then you can create pdfs just as easy.
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- RSS Feeds
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- Readers' Choice Awards
- The Secret Password Is...
- Reply to comment | Linux Journal
9 min 58 sec ago - All the articles you talked
2 hours 33 min ago - All the articles you talked
2 hours 36 min ago - All the articles you talked
2 hours 38 min ago - myip
7 hours 2 min ago - Keeping track of IP address
8 hours 53 min ago - Roll your own dynamic dns
14 hours 7 min ago - Please correct the URL for Salt Stack's web site
17 hours 18 min ago - Android is Linux -- why no better inter-operation
19 hours 33 min ago - Connecting Android device to desktop Linux via USB
20 hours 2 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Don't get it working
I don't get it working. Im on Ubuntu and used the following lines:
$ sudo apt-get install unoconv
$ unoconv --listener
But somehow my server is tripping after those comments...
Can someone give me some tips? Or maby another program? Is Fedora usefull aswell?
Thanks alot! Marcus Faul
The unoconv --listener server
The unoconv --listener server program starts an instance of LibreOffice / OpenOffice, actually, soffice (the original name was StarOffice). Make sure to have exited all your office sessions, also use ps ax | grep office to ensure that all soffice binaries are killed before you run the unoconv --listener command.
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
cloud?
My query may be tangential by nature, but I'm wondering what the future of documents looks like on the Linux system. I have an abundance of documents to convert and then send off via external message delivery. I am seeking assistance on both ends of this task. I have received some feedback about potential solutions for the delivery via cursory research online(http://www.port25.com/ and a few others came up in my initial search). But I'm a ways off from deciding, so plenty of time to research the best fit. The problem is, I have no idea where to start with the conversion of the documents.
I have been infatuated with Linux and it's sleek, programmer friendly interface for a long time. Admittedly, I have not spent the requisite amount of time learning OS to feel comfortable doing this myself.
I'm not sure if I'm lazy, or inundated by the constant chatter I hear about storage solutions such as "the cloud", that I think this should be easier said then done.
All that being said, I appreciate the tutorial. At least I know of one solution that works. Time will tell if I can actually implement it for my own situation!
We need a tool for MASS-CONVERTING documents
The communnity badly needs a tool for mass-converting Microsoft Office documents to OpenDocument, with as little loss in functionality as possible. Problems occur with documents containing macros, special formatting, etc.
I ever dreamt of a Postfix plugin that I'd install on my mailserver, that will convert .doc attachements to .odt, on the fly...
How about shell-scripting it?
One way I could see to do that mass-conversion would be to do something like this, using odt as the "destination".
while read filename
do
unoconv -f odt $filename
done < ls -C1 -R | grep -E "\.doc$|\.docx$"
You could do the same thing with .xls/.xlsx, .ppt/.pptx, and so on.
Script for conversion
Thanks for the idea, but that's for programmers only. And we need a more refined script: there are documents that do not convert well, documents with passwords, documents with macros, etc. We need to treat that exceptions.
The „Conversion Assistant” in LibreOffice's File menu is a good starting point.
My „dream” is to have a Postfix plugin that will do the following: when a mail with a .doc attchement arives, it converts the attachement to .odt (and optionally reply to the sender "Please don't send documents in proprietary formats") :)
How about HTML
Is HTML one of the supported formats?
I recently had a user question about the best way of converting DOCs to HTML.
SAVE AS HTML is 'orrible
SAVE AS HTML FILTERED is somewhat better.
Is there anything better than those 2 options?
why not use other format.
if you think difficult to convert doc's to html, why not try other format. i don't usually use doc as base to create html page.it tend change the code i put.
cheers!
swiss watch brands
Swiss-Watches-Guide.com
I have a program on my Fedora
I have a program on my Fedora computer called pdftohtml. I guess you could use unoconv to convert a doc file to pdf, and then convert that to html using pdftohtml.