# postfix installation; best with debian - no configuration - choose # install apt-get install postfix # Example for /etc/postfix/main.cf: myhostname = pdfserver.domain.tld mydomain = domain.tld mydestination = $mydomain myorigin = $mydomain alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases # Any private email server, which is used as a smart host. # relay host = mail.domain.tld mynetworks = 127.0.0.0/8 #, any IP address of your email server message_size_limit = 51200000 # size of your own email server to adapt # create an alias for the redirection of email: Datei /etc/aliases: pdf: "|/usr/local/bin/pdf-konverter.sh" # and translate the table still in the database format for postfix: postalias /etc/aliases # install killall from the psmisc package apt-get install psmisc # install uuencode from the sharutils package apt-get install sharutils # install make and gcc apt-get install make gcc # complete the following entries in the /etc/apt/sources.lst: # Backports for LibreOffice deb http://backports.debian.org/debian-backports squeeze-backports main # install LibreOffice from the backports aptitude install -t squeeze-backports libreoffice # Change to the source directory to install ripmime cd /usr/local/src # ripmime - Download per wget wget http://www.pldaniels.com/ripmime/ripmime-1.4.0.9.tar.gz # unpack with tar tar xzf ripmime-1.4.0.9.tar.gz # change to the ripmime source directory cd ripmime-1.4.0.9/ # execute make make && make install chown nobody:nogroup /usr/local/bin/ripmime # change to the source directory to install unoconv cd /usr/local/src # unoconv 0.4-1 - Download per wget wget http://ftp.de.debian.org/debian/pool/main/u/unoconv/unoconv_0.4-1_all.deb # install unoconv dpkg -i unoconv_0.4-1_all.deb # create the start script for unoconv - start in listener mode: touch /etc/init.d/unoconvd chmod 755 /etc/init.d/unoconvd # File /etc/init.d/unoconvd: # script includes the tar file #!/bin/sh ### BEGIN INIT INFO # Provides: unoconvd # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 5 # Default-Stop: # Description: unoconvd - Converting documents to PDF by unoconv ### END INIT INFO case "$1" in start) /usr/bin/unoconv --listener & ;; stop) killall soffice.bin ;; restart) killall soffice.bin sleep 1 /usr/bin/unoconv --listener & ;; esac # The following command starts unoconvd at standard runlevel. # If insserv is not implemented in other distributions, # update-rc.d or chkconfig can be used insserv -d unoconvd # Start testing with unoconvd /etc/init.d/unoconv start # Script pdf-konverter.sh, which is included in the tar file, # is copied to /usr/local/bin # and given the following permissions: chown nobody:nogroup /usr/local/bin/pdf-konverter.sh chmod 755 /usr/local/bin/pdf-konverter.sh # Links: [1] Workarounds for pyuno problems in Ooo3.0.0: http://udk.openoffice.org/python/python-bridge.html [2] unoconv-unstable: http://packages.debian.org/sid/all/unoconv/download [3] unoconv - Convert between any document format supported by OpenOffice: http://dag.wieers.com/home-made/unoconv [4] Starting LibreOffice with parameters: http://help.libreoffice.org/Common/Starting_the_Software_With_Parameters/de [5] OpenOffice.org - Export to the PDF file format: http://de.openoffice.org/doc/howto_2_0/office/exportpdfformat.pdf [6] uudeview: http://www.fpx.de/fp/Software/UUDeview [7] ripmime: http://www.pldaniels.com/ripmime/ripmime-1.4.0.9.tar.gz [8] Antiword: http://freshmeat.net/projects/antiword [9] Pandoc - a universal document converter: http://johnmacfarlane.net/pandoc [10] JOD- und PyODConverter: http://artofsolving.com/opensource [11] LOPDFConverter: http://sourceforge.net/projects/lopdfconverter [12] OpenOffice API/Tutorials/PDF export: http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export