3
# Authors: Simon Steinbeiß <simon@xfce.org>
4
# Florian Schüller <florian.schueller@gmail.com>
10
# just some incomplete useability hints for possible errors
12
# The list of extensions is based on the LibreOffice Mimetype List, adding some that were missing (e.g. .rtf):
13
# LIBREOFFICE_MIME_FILE=/usr/share/mime-info/libreoffice.mime
14
*.doc|*.docm|*.docx|*.dotm|*.dotx|*.fodg|*.fodp|*.fods|*.fodt|*.odb|*.odf|*.odg|*.odm|*.odp|*.ods|*.odt|*.otg|*.oth|*.otp|*.ots|*.ott|*.potm|*.potx|*.ppt|*.pptm|*.pptx|*.rtf|*.xls|*.xlsb|*.xlsm|*.xlsx|*.xltm|*.xltx)
15
# either libreoffice call failed or $LIBREOFFICE_MIME_FILE is missing
16
if [ -x "$(command -v libreoffice)" ]; then
17
libreoffice --nologo -p "$File"
19
notify-send "Printing $File failed" "LibreOffice does not seem to be installed." -i document-print
23
if [ -x "$(command -v gimp)" ]; then
24
gimp --no-interface --new-instance --batch="(file-print-gtk 0 (car (gimp-file-load 1 \"$File\" \"$File\")))" --batch="(gimp-quit 1)"
26
notify-send "Printing $File failed" "Gimp does not seem to be installed." -i document-print
30
if [ -x "$(command -v inkscape)" ]; then
31
inkscape --without-gui --export-pdf=/dev/stdout "$File"| lpr
33
notify-send "Printing $File failed" "Inkscape does not seem to be installed." -i document-print
36
# The CUPS extensions are based on the CUPS_FILTER_FILE
37
# CUPS_FILTER_FILE=/usr/share/cups/mime/cupsfilters.convs
38
*.asc|*.brf|*.css|*.gif|*.htm|*.html|*.jpe|*.jpeg|*.jpg|*.pbm|*.pdf|*.pgm|*.png|*.pnm|*.pot|*.ppm|*.shtml|*.srt|*.text|*.tif|*.tiff|*.txt|*.xbm|*.xpm|*.xwd)
39
if [ -x "$(command -v lpr)" ]; then
42
notify-send "Printing $File failed" "CUPS does not seem to be installed." -i document-print
46
notify-send "Printing $File failed" "The File $File cannot be printed directly." -i document-print