aboutsummaryrefslogtreecommitdiff
path: root/print/hpijs
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2003-06-02 00:02:25 +0000
committerDoug Barton <dougb@FreeBSD.org>2003-06-02 00:02:25 +0000
commit6b8eb9e06f7ee3712324798af897a8357ddba408 (patch)
tree91049f4bb8152e614b702e5911bec7a4902ac179 /print/hpijs
parent81d654ea0838b029368c7f324f58ccdb8c4b9d7d (diff)
downloadports-6b8eb9e06f7ee3712324798af897a8357ddba408.tar.gz
ports-6b8eb9e06f7ee3712324798af897a8357ddba408.zip
Notes
Diffstat (limited to 'print/hpijs')
-rw-r--r--print/hpijs/files/ifhp79
-rw-r--r--print/hpijs/files/printcap.sample9
2 files changed, 88 insertions, 0 deletions
diff --git a/print/hpijs/files/ifhp b/print/hpijs/files/ifhp
new file mode 100644
index 000000000000..413ca87a69af
--- /dev/null
+++ b/print/hpijs/files/ifhp
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Please see detailed copyright below.
+
+PATH=/bin
+export PATH
+
+# This is the input filter that I use for my HP Deskjet 960c.
+# If you are using a different model, you will have to change
+# the -sDeviceModel= parameter below. You will probably also
+# want to change some of the other parameters. I have the
+# options set for the highest quality output my printer will
+# do with this driver. I use the ghostscript-afpl port, but
+# this should work equally well with other types of gs.
+#
+# To use this, copy it into a handy location (the sample printcap
+# file in this directory assumes /usr/local/etc/bin/), adjust
+# /etc/printcap accordingly, adjust any settings below, start or
+# restart lpd, and start printing!
+#
+# For more information, check out the handbook section on printing:
+# http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing.html
+
+# Send a reset, then Treat LF as CR+LF:
+#
+printf "\033E\033&k2G" || exit 2
+
+# Read first line of the file to determine type of input
+#
+read first_line
+
+case "${first_line}" in
+\%\!*)
+ #
+ # PostScript input, so use ghostscript and hpijs
+ #
+ /usr/local/bin/gs -q -dNOPAUSE -dSAFER -r600x600 \
+ -sDEVICE=ijs -sIjsServer=/usr/local/bin/hpijs -dIjsUseOutputFD \
+ -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="DESKJET 960" \
+ -sIjsParams="Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2" \
+ -sOutputFile=- - && exit 0
+ ;;
+*)
+ #
+ # Plain text or HP/PCL, so just print it directly.
+ # Print a form feed at the end to eject the last page.
+ #
+ echo $first_line && cat && printf "\033&l0H\033E" && exit 0
+ ;;
+esac
+
+# Should not be reached
+exit 2
+
+
+# Copyright (c) 2003 The FreeBSD Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
diff --git a/print/hpijs/files/printcap.sample b/print/hpijs/files/printcap.sample
new file mode 100644
index 000000000000..a2166c42ca1c
--- /dev/null
+++ b/print/hpijs/files/printcap.sample
@@ -0,0 +1,9 @@
+
+# This is a sample printcap file suitable for use with the ifhp
+# input filter. It assumes that you are using the first USB print
+# device. If not, adjust lp= accordingly.
+
+lp:\
+ :sh:\
+ :lp=/dev/ulpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\
+ :mx#0:if=/usr/local/etc/bin/ifhp: