<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Josue Perez</title>
    <description>The latest articles on DEV Community by Josue Perez (@jperez2511).</description>
    <link>https://dev.to/jperez2511</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F366840%2Fe54b87f9-1e56-45f0-9930-a174ec1c2a2b.png</url>
      <title>DEV Community: Josue Perez</title>
      <link>https://dev.to/jperez2511</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jperez2511"/>
    <language>en</language>
    <item>
      <title>How to install Unoconv</title>
      <dc:creator>Josue Perez</dc:creator>
      <pubDate>Tue, 20 Apr 2021 18:46:58 +0000</pubDate>
      <link>https://dev.to/jperez2511/how-to-install-unoconv-57i9</link>
      <guid>https://dev.to/jperez2511/how-to-install-unoconv-57i9</guid>
      <description>&lt;p&gt;unoconv (Universal office convert) is a very special tool when it comes to converting Word files to PDF.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;0. Verify if python is installing&lt;/strong&gt;&lt;br&gt;
if you don't have python installed so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## look for the latest version&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;dnf &lt;span class="nb"&gt;install &lt;/span&gt;python3.8

&lt;span class="c"&gt;## set aliases&lt;/span&gt;
alternatives &lt;span class="nt"&gt;--set&lt;/span&gt; python /usr/bin/python3

&lt;span class="c"&gt;## more information &lt;/span&gt;
man unversioned-python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;1. install libreOffice&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;important!&lt;/strong&gt; download the latest stable version compatible with unoconv from &lt;a href="http://download.documentfoundation.org/libreoffice/stable"&gt;http://download.documentfoundation.org/libreoffice/stable&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## download libreoffice&lt;/span&gt;
wget http://download.documentfoundation.org/libreoffice/stable/6.0.4/deb/x86_64/LibreOffice_6.0.4_Linux_x86-64_deb.tar.gz

&lt;span class="c"&gt;## unzip&lt;/span&gt;
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xvf&lt;/span&gt; LibreOffice_6.4.7_Linux_x86-64_rpm.tar.gz

&lt;span class="c"&gt;## install RPM&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;LibreOffice_6.4.7_Linux_x86-64_rpm/RPMS
dnf &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.rpm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. install unoconv&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/dagwieers/unoconv.git
&lt;span class="c"&gt;# this &lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;unoconv/unoconv /usr/bin
&lt;span class="c"&gt;# or &lt;/span&gt;
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; unoconv/unoconv /usr/bin/unoconv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;3. configure service for apache *&lt;/em&gt;&lt;br&gt;
first, edit or create this file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vi /etc/systemd/system/unoconv.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;second, paste the following text, but it's important to replace UNO_PATH with the libreOffice installation path.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Unit]
Description=Unoconv listener for document conversions
Documentation=https://github.com/dagwieers/unoconv
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
Environment="UNO_PATH=/usr/lib64/libreoffice/program"
ExecStart=/usr/bin/unoconv --listener

[Install]
WantedBy=multi-user.target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now you can start unoconv service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;unoconv.service
systemctl start unoconv.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
      <category>fedora</category>
      <category>pdf</category>
      <category>libreoffice</category>
    </item>
  </channel>
</rss>
