Add a simple filter that encapsulates ascii text into HP PJL format.

Script written by Ross Harvey.
This commit is contained in:
garbled 2006-01-20 08:37:26 +00:00
parent 08c90217fd
commit bd7bcee846
2 changed files with 19 additions and 1 deletions

View File

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.7 2002/09/18 13:31:54 lukem Exp $
# $NetBSD: Makefile,v 1.8 2006/01/20 08:37:26 garbled Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
NOMAN= # defined
PROG= lpf
SCRIPTS= pjlfilter.sh
BINDIR= /usr/libexec/lpr
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#!/bin/sh
# Filter to encapsulate text files in HP PJL format, suitable for use as an
# if filter for any printer supporting the HP PJL format, such as the
# HP LaserJet IIIsi
doescape () {
printf "\33%%-12345X"
}
doescape
echo @PJL
echo @PJL JOB
cat
doescape
doescape
echo @PJL
echo @PJL EOJ
doescape