<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Waage Blog &#187; headless</title>
	<atom:link href="http://qugstart.com/blog/tag/headless/feed/" rel="self" type="application/rss+xml" />
	<link>http://qugstart.com/blog</link>
	<description>Ruby, Rails, Life</description>
	<lastBuildDate>Thu, 10 Nov 2011 00:35:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenOffice Headless Mode Installation Word doc to pdf conversion</title>
		<link>http://qugstart.com/blog/linux/openoffice-headless-mode-installation-word-doc-to-pdf-conversion/</link>
		<comments>http://qugstart.com/blog/linux/openoffice-headless-mode-installation-word-doc-to-pdf-conversion/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:30:57 +0000</pubDate>
		<dc:creator>Andrew Waage</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[headless]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[microsoft word to doc]]></category>
		<category><![CDATA[msword]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[soffice]]></category>

		<guid isPermaLink="false">http://qugstart.com/blog/?p=9</guid>
		<description><![CDATA[How to set up OpenOffice to run in headless mode on Fedora 9
What we wanted was a system set up to convert any OpenOffice document to PDF. Most importantly, we needed to convert Word .doc files to .pdf, but in fact, any OpenOffice file types (.xls, .odt, .txt, .rtf, etc) will work, as long as [...]]]></description>
			<content:encoded><![CDATA[<p>How to set up OpenOffice to run in headless mode on Fedora 9</p>
<p>What we wanted was a system set up to convert any OpenOffice document to PDF. Most importantly, we needed to convert Word .doc files to .pdf, but in fact, any OpenOffice file types (.xls, .odt, .txt, .rtf, etc) will work, as long as you install the proper packages / dependencies!</p>
<p>Also important:<br />
We will be starting OpenOffice in headless mode, which means no GUI. This should be started on boot up, and should just run in the background.</p>
<p>Install:<br />
You don&#8217;t need to install all the OpenOffice packages if you don&#8217;t need them. We are mainly concerned with Word docs, so OoWriter is a must. We are running in headless mode, which means we don&#8217;t have a GUI to openoffice. So we can leave out a bunch of unnecessary packages.</p>
<p>- Here&#8217;s what we have installed:</p>
<pre lang="bash" class="prettyprint">
openoffice.org-core.x86_64  1:2.4.2-18.3.fc9 installed
openoffice.org-headless.x86_64 1:2.4.2-18.3.fc9 installed
openoffice.org-pyuno.x86_64 1:2.4.2-18.3.fc9 installed
openoffice.org-sdk.x86_64 1:2.4.2-18.3.fc9 installed
openoffice.org-writer.x86_64 1:2.4.2-18.3.fc9 installed
openoffice.org-writer2latex.x86_64 0.5-2.fc9 installed
</pre>
<p>If you need to convert Excel spreadsheets, ppt Powerpoint presentations to pdf, you will need to install the corresponding package (ie. openoffice.org-calc, openoffice.org-draw, etc.)</p>
<p>After you have these packages installed, be sure you have the soffice command. By default it is here:<br />
/usr/lib64/<a href="http://openoffice.org/program/soffice.bin" target="_blank">openoffice.org/program/soffice.bin</a></p>
<p>Next, try to start up the service with this command:</p>
<pre lang="bash" class="prettyprint">
$ /usr/lib64/openoffice.org/program/soffice.bin -headless accept="socket,host=localhost,port=8100;urp;" -nofirststartwizard &amp;
</pre>
<p>#Note: the ampersand (&amp;) allows the command to run in background so you get your shell back.<br />
You can specify whichever port you would like. The -nofirststartwizard flag does exactly that.</p>
<p>Next step is to find a script (client) that can interact with this OpenOffice service.<br />
A few options are:<br />
1. dag&#8217;s unoconv (Available from yum)<br />
<a href="http://dag.wieers.com/home-made/unoconv/" target="_blank">http://dag.wieers.com/home-made/unoconv/</a><br />
2. PyODConverter &#8211; a cool Python script to do conversions<br />
<a href="http://www.artofsolving.com/opensource/pyodconverter" target="_blank">http://www.artofsolving.com/opensource/pyodconverter</a><br />
3. Write your own!</p>
<p>We chose to use PyODConverter. It&#8217;s simple to use:</p>
<pre lang="bash" class="prettyprint">
$ PyODConverter.py example.doc example.pdf
</pre>
<p>Lastly, I mentioned that we want this soffice to start up everytime we reboot.</p>
<p>Simply add the line to your /etc/rc.d/rc.local</p>
<pre lang="bash" class="prettyprint">
# Start up openoffice for fax conversion
$ /usr/lib64/openoffice.org/program/soffice.bin -headless accept="socket,host=localhost,port=8100;urp;" -nofirststartwizard
</pre>
<p>And there you have it. Hope that helps somebody. Happy Conversions!</p>
<p>Hint: If you are getting strange unintelligible errors about &#8220;URL seems to be an unsupported one&#8221;, it may be that you have not installed a necessary openoffice package. That&#8217;s how I discovered I needed OoWriter &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://qugstart.com/blog/linux/openoffice-headless-mode-installation-word-doc-to-pdf-conversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

