aboutsummaryrefslogtreecommitdiff
path: root/share/examples/printing/hpdf
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/printing/hpdf')
-rw-r--r--share/examples/printing/hpdf59
1 files changed, 0 insertions, 59 deletions
diff --git a/share/examples/printing/hpdf b/share/examples/printing/hpdf
deleted file mode 100644
index d03c3ac70dfd..000000000000
--- a/share/examples/printing/hpdf
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#
-# hpdf - Print DVI data on HP/PCL printer
-# Installed in /usr/local/libexec/hpdf
-
-PATH=/usr/local/bin:$PATH; export PATH
-
-#
-# Define a function to clean up our temporary files. These exist
-# in the current directory, which will be the spooling directory
-# for the printer.
-#
-cleanup() {
- rm -f hpdf$$.dvi
-}
-
-#
-# Define a function to handle fatal errors: print the given message
-# and exit 2. Exiting with 2 tells LPD to do not try to reprint the
-# job.
-#
-fatal() {
- echo "$@" 1>&2
- cleanup
- exit 2
-}
-
-#
-# If user removes the job, LPD will send SIGINT, so trap SIGINT
-# (and a few other signals) to clean up after ourselves.
-#
-trap cleanup 1 2 15
-
-#
-# Make sure we are not colliding with any existing files.
-#
-cleanup
-
-#
-# Link the DVI input file to standard input (the file to print).
-#
-ln -s /dev/fd/0 hpdf$$.dvi || fatal "Cannot symlink /dev/fd/0"
-
-#
-# Make LF = CR+LF
-#
-printf "\033&k2G" || fatal "Cannot initialize printer"
-
-#
-# Convert and print. Return value from dvilj2p does not seem to be
-# reliable, so we ignore it.
-#
-dvilj2p -M1 -q -e- dfhp$$.dvi
-
-#
-# Clean up and exit
-#
-cleanup
-exit 0