Personal tools
HylaFAX The world's most advanced open source fax server

Difference between revisions of "Handbook:Advanced Server Configuration:Faxing Third-Party Document Formats"

(Created page with 'HylaFAX includes native support for faxing PDF, Postscript and TIFF document formats, but is easily extended to support nearly any common document format through a conversion eng…')
 
Line 1: Line 1:
 
HylaFAX includes native support for faxing PDF, Postscript and TIFF document formats, but is easily extended to support nearly any common document format through a conversion engine know as 'typerules'.
 
HylaFAX includes native support for faxing PDF, Postscript and TIFF document formats, but is easily extended to support nearly any common document format through a conversion engine know as 'typerules'.
 +
 +
 +
==MS Office / OpenOffice Documents==
 +
 +
The following procedure was initially contributed by Madhawa Jayanath on the hylafax-users mailing list:
 +
 +
 +
====Install apps & libs====
 +
yum install openoffice.org-core openoffice.org-headless openoffice.org-base openoffice.org-calc openoffice.org-writer openoffice.org-impress openoffice.org-draw openoffice.org-graphicfilter openoffice.org-pyuno openoffice.org-xsltfilter openoffice.org-math
 +
yum install poppler poppler-utils poppler-devel
 +
 +
====Download "jodconverter"====
 +
 +
cd /usr/src
 +
wget http://downloads.sourceforge.net/project/jodconverter/JODConverter/2.2.2/jodconverter-2.2.2.zip?use_mirror=biznetnetworks
 +
unzip jodconverter-2.2.2.zip
 +
 +
 +
====Create "doc2ps" Script====
 +
 +
nano /usr/sbin/doc2ps
 +
 +
<pre>
 +
#/bin/bash
 +
 +
java -jar /usr/src/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar -f pdf $1
 +
pdftops -paper A4 ${1%\.*}.pdf $2
 +
rm -f ${1%\.*}.pdf
 +
</pre>
 +
 +
chmod 755 /usr/sbin/doc2ps
 +
 +
====Create a script for starting OpenOffice headless====
 +
 +
(Please find the location of "soffice.bin" and replace the path "/usr/lib/openoffice.org/program/")
 +
 +
nano /usr/sbin/runoffice
 +
/usr/lib/openoffice.org/program/soffice.bin "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -norestore  nofirststartwizard -nologo -headless  &
 +
chmod 755 /usr/sbin/runoffice
 +
 +
====Start OpenOffice headless====
 +
 +
runoffice
 +
 +
====Test with a M$ Doc file====
 +
 +
Upload a doc file to /usr/src/
 +
 +
doc2ps /usr/src/mytest.doc /usr/src/mytest.ps
 +
 +
If this works you can see "mytest.ps" in /usr/src
 +
 +
 +
====Add M$ DOC support to hylafax====
 +
 +
nano /etc/hylafax/typerules
 +
------add this line to the bottom of typerules------
 +
0      short          0xd0cf          ps      doc2ps %i %o
 +
----------------------------------------------------
 +
 +
====Send M$ doc file as a FAX====
 +
 +
sendfax -n -d 02xxxxxxx /usr/src/mytest.doc
 +
 +
 +
That's it!

Revision as of 16:07, 28 October 2009

HylaFAX includes native support for faxing PDF, Postscript and TIFF document formats, but is easily extended to support nearly any common document format through a conversion engine know as 'typerules'.


MS Office / OpenOffice Documents

The following procedure was initially contributed by Madhawa Jayanath on the hylafax-users mailing list:


Install apps & libs

yum install openoffice.org-core openoffice.org-headless openoffice.org-base openoffice.org-calc openoffice.org-writer openoffice.org-impress openoffice.org-draw openoffice.org-graphicfilter openoffice.org-pyuno openoffice.org-xsltfilter openoffice.org-math
yum install poppler poppler-utils poppler-devel

Download "jodconverter"

cd /usr/src
wget http://downloads.sourceforge.net/project/jodconverter/JODConverter/2.2.2/jodconverter-2.2.2.zip?use_mirror=biznetnetworks
unzip jodconverter-2.2.2.zip


Create "doc2ps" Script

nano /usr/sbin/doc2ps

#/bin/bash

java -jar /usr/src/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar -f pdf $1
pdftops -paper A4 ${1%\.*}.pdf $2
rm -f ${1%\.*}.pdf

chmod 755 /usr/sbin/doc2ps

Create a script for starting OpenOffice headless

(Please find the location of "soffice.bin" and replace the path "/usr/lib/openoffice.org/program/")

nano /usr/sbin/runoffice
/usr/lib/openoffice.org/program/soffice.bin "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -norestore  nofirststartwizard -nologo -headless  &
chmod 755 /usr/sbin/runoffice

Start OpenOffice headless

runoffice

Test with a M$ Doc file

Upload a doc file to /usr/src/

doc2ps /usr/src/mytest.doc /usr/src/mytest.ps

If this works you can see "mytest.ps" in /usr/src


Add M$ DOC support to hylafax

nano /etc/hylafax/typerules


add this line to the bottom of typerules------
0      short           0xd0cf          ps      doc2ps %i %o

Send M$ doc file as a FAX

sendfax -n -d 02xxxxxxx /usr/src/mytest.doc


That's it!



Powered by MediaWiki
Attribution-ShareAlike 2.5

Project hosted by iFAX Solutions