diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..348cd72 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,32 @@ +pnm2ppa for Debian +---------------------- + +Using the pnm2ppa filter, it's possible to use printer with the PPA protocol. +PPA is a proprietary protocol by Hewlett Packard. Printers using PPA are +normally Windows-only. pnm2ppa supports color now. + +The configuration files are in /etc/ppa/. The papersize is being autodetected +since this version. + +This package is based on the pbm2ppa package. Thanks to Ionutz Borcoman +. + + -- Roland Bauerschmidt , Thu, 30 Mar 2000 20:51:28 +0100 + +Starting with pnm2ppa-1.0, pbm2ppa is completely replaced by pnm2ppa. pnm2ppa +will create symlinks for old filters, so your old printcap should work without +changes. + + -- Ionutz Borcoman , Fri, 11 Aug 2000 + +As of Nov 2000, I don't use a PPA printer anymore. I'll continue to maintain +this package untill Roland can maintain it again, but I'll be unable to +test it myself. + + -- Ionutz Borcoman , Thu, 09 Nov 2000 + +If you're using magicfilter or apsfilter, run magicfilterconfig or +apsfilterconfig and simply follow the instructions. + + -- Matej Vela Tue, 17 Apr 2001 17:48:24 +0200 + diff --git a/debian/calibrate_ppa.8 b/debian/calibrate_ppa.8 new file mode 100644 index 0000000..717bc20 --- /dev/null +++ b/debian/calibrate_ppa.8 @@ -0,0 +1,67 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH calibrate_ppa 8 "November 05, 2000" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.\" This file was created by Chad C. Walstrom +.\" for the pnm2ppa project. +.\" +.SH NAME +calibrate_ppa \- pnm2ppa calibration tool +.SH SYNOPSIS +.B calibrate_ppa +.RI [options] +.SH DESCRIPTION +Produces various PixMap (PPM) files used for calibrating pnm2ppa. +.TP +This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. +.SH NOTE +The size of a full-page PixMap is 100MB!!. These PixMaps should be piped directly to pnm2ppa, except in the case of the -g option, where the PixMap should be viewed or printed by other means. +.SH OPTIONS +.TP +.B \-g, \-\-gamma +produce gamma.ppm (10MB, used in color calibration). +.TP +.B \-h, \-\-help +displays this help text. +.TP +.B \-o +output to file , "-o -" means stdout (default) +.TP +.B \-p +create test pattern number +.TP +.B \-\-align +pattern 0: align print heads. (default) +.TP +.B \-\-test +pattern 1: test alignment. +.TP +.B \-\-clean +pattern 2: clean print head. +.TP +.B \-\-center +pattern 3: center paper. +.TP +.B \-s\fR +default papersize (a4, legal, letter = us (default)) +.PD +.SH AUTHOR +This manual page was written by Chad C. Walstrom , +for the Debian GNU/Linux system (but may be used by others). +.SH SEE ALSO +.IR pnm2ppa (8), +.IR magicfilter (8), +.IR apsfilter (8) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..618e5fb --- /dev/null +++ b/debian/changelog @@ -0,0 +1,87 @@ +pnm2ppa (1.04-4) unstable; urgency=low + + * Long overdue adopted package. Closes: #88234 + * Added a manpage for both pnm2ppa and calibrate_ppa. + + -- Chad C. Walstrom Sat, 23 Jun 2001 00:26:02 -0500 + +pnm2ppa (1.04-3) unstable; urgency=low + + * `Suggests: magicfilter | apsfilter' rather than `Depends: + magicfilter'. The postinst no longer calls magicfilterconfig. + + -- Matej Vela Tue, 17 Apr 2001 18:09:39 +0200 + +pnm2ppa (1.04-2) unstable; urgency=low + + * debian/rules: Add `-DLANG_EN' to $(CFLAGS). (God, I'm stupid -- + thanks to OHURA Makoto for the patch.) Closes: #93064. + + -- Matej Vela Fri, 6 Apr 2001 20:33:55 +0200 + +pnm2ppa (1.04-1) unstable; urgency=low + + * New upstream version. Closes: #85224. + * Package is orphaned; maintainer set to Debian QA Group. + * Conforms to Standards version 3.5.2: + * Added build dependancies. + * Added support for the `debug' build option. + * Made lintian-clean. + + -- Matej Vela Mon, 19 Mar 2001 09:37:13 +0100 + +pnm2ppa (1.03-1) unstable; urgency=low + + * New upstream release. + + -- Ionutz Borcoman Thu, 9 Nov 2000 13:53:51 +0900 + +pnm2ppa (1.0-1) unstable; urgency=low + + * New upstream release. + * New maintainer. + * Completly replaces pbm2ppa. + + -- Ionutz Borcoman Fri, 11 Aug 2000 12:19:15 +0900 + +pnm2ppa (0.99-0.pre3) unstable; urgency=low + + * New upsteam release + * Updated maintainer field to new @debian.org address ;) + + -- Roland Bauerschmidt Sun, 4 Jun 2000 13:26:45 +0200 + +pnm2ppa (0.99-0.pre2) unstable; urgency=low + + * New upstream release + * Fixed problem with version numbers + + -- Roland Bauerschmidt Thu, 13 Apr 2000 21:41:04 +0200 + +pnm2ppa (0.99pre1-1) unstable; urgency=low + + * New upstream release + + -- Roland Bauerschmidt Thu, 6 Apr 2000 20:46:30 +0200 + +pnm2ppa (0.20000326-1) unstable; urgency=low + + * New upstream release + + -- Roland Bauerschmidt Wed, 29 Mar 2000 16:38:26 +0200 + +pnm2ppa (0.20000120-2) unstable; urgency=low + + * Fixed Dependencies: gs is included in the Dependencies now. + + -- Roland Bauerschmidt Wed, 8 Mar 2000 17:26:29 +0100 + +pnm2ppa (0.20000120-1) unstable; urgency=low + + * Initial Release. + + -- Roland Bauerschmidt Wed, 8 Mar 2000 17:25:05 +0100 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5796830 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: pnm2ppa +Section: text +Priority: optional +Maintainer: Chad Walstrom +Standards-Version: 3.5.2 +Build-Depends: debhelper (>= 3) + +Package: pnm2ppa +Architecture: any +Depends: ${shlibs:Depends}, gs +Suggests: magicfilter | apsfilter +Replaces: pbm2ppa +Provides: pbm2ppa +Conflicts: pbm2ppa +Description: PPM to PPA converter + Using pnm2ppa it's possible to run HP-GDI printers on Linux. These printers + are normally "Windows-only" and use the PPA protocol which is proprietary. + pnm2ppa supports color and is supposed to work faster than pbm2ppa. + . + pnm2ppa supports the following printers: HP Deskjet 7XX Series, HP Deskjet + 820 Series and HP Deskjet 1000 Series. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..faba78c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Roland Bauerschmidt on +Sat, 4 Mar 2000 20:51:28 +0100. + +It was downloaded from http://sourceforge.net/projects/pnm2ppa/ + +Upstream Author(s): Tim Norman + +Copyright: + +GPL (see /usr/share/common-licenses/GPL for details) diff --git a/debian/etc/magicfilter/pnm2ppa-1000-bw-eco-filter b/debian/etc/magicfilter/pnm2ppa-1000-bw-eco-filter new file mode 100644 index 0000000..16ad119 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-1000-bw-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw --eco -f /etc/ppa/pnm2ppa.conf.hp1000 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-1000-bw-filter b/debian/etc/magicfilter/pnm2ppa-1000-bw-filter new file mode 100644 index 0000000..ab27dc5 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-1000-bw-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw -f /etc/ppa/pnm2ppa.conf.hp1000 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-1000-color-eco-filter b/debian/etc/magicfilter/pnm2ppa-1000-color-eco-filter new file mode 100644 index 0000000..87bdedd --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-1000-color-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --eco -f /etc/ppa/pnm2ppa.conf.hp1000 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-1000-color-filter b/debian/etc/magicfilter/pnm2ppa-1000-color-filter new file mode 100644 index 0000000..620420f --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-1000-color-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa -f /etc/ppa/pnm2ppa.conf.hp1000 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-720-bw-eco-filter b/debian/etc/magicfilter/pnm2ppa-720-bw-eco-filter new file mode 100644 index 0000000..d6aab44 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-720-bw-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw --eco -f /etc/ppa/pnm2ppa.conf.hp720 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-720-bw-filter b/debian/etc/magicfilter/pnm2ppa-720-bw-filter new file mode 100644 index 0000000..48e6c6a --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-720-bw-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw -f /etc/ppa/pnm2ppa.conf.hp720 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-720-color-eco-filter b/debian/etc/magicfilter/pnm2ppa-720-color-eco-filter new file mode 100644 index 0000000..62f2b17 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-720-color-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --eco -f /etc/ppa/pnm2ppa.conf.hp720 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-720-color-filter b/debian/etc/magicfilter/pnm2ppa-720-color-filter new file mode 100644 index 0000000..b0d1d4e --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-720-color-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa -f /etc/ppa/pnm2ppa.conf.hp720 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-820-bw-eco-filter b/debian/etc/magicfilter/pnm2ppa-820-bw-eco-filter new file mode 100644 index 0000000..ca30508 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-820-bw-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw --eco -f /etc/ppa/pnm2ppa.conf.hp820 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-820-bw-filter b/debian/etc/magicfilter/pnm2ppa-820-bw-filter new file mode 100644 index 0000000..c80f7de --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-820-bw-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --bw -f /etc/ppa/pnm2ppa.conf.hp820 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-820-color-eco-filter b/debian/etc/magicfilter/pnm2ppa-820-color-eco-filter new file mode 100644 index 0000000..4fc0c7b --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-820-color-eco-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa --eco -f /etc/ppa/pnm2ppa.conf.hp820 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/magicfilter/pnm2ppa-820-color-filter b/debian/etc/magicfilter/pnm2ppa-820-color-filter new file mode 100644 index 0000000..937c593 --- /dev/null +++ b/debian/etc/magicfilter/pnm2ppa-820-color-filter @@ -0,0 +1,139 @@ +#!/usr/sbin/magicfilter +# +# Magic filter setup file for HP printers 720, 820 and 1000 series. + +# pnm2ppa supports color and black/white printing. This file was +# tested on a HP Deskjet 720C printer, but is supposed to work on +# other printers using the HP PPA protocol, too. Supported pagesizes +# are a4, letter and legal. The pagesize has to be set in /etc/papersize +# and not in the configuration files in /etc/ppa/pnm2ppa.conf.hp*. + +# Adapted from dj500-filter, cpsonly600-filter and pbm2ppa-filter +# by Roland Bauerschmidt , 2000 + +# PostScript +0 %! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit +0 \004%! fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- - -c quit + +# PDF +0 %PDF fpipe /usr/bin/gs -q -dSAFER -dNOPAUSE -r600 -sDEVICE=ppmraw -sOutputFile=- $FILE -c quit + + +# TeX DVI +0 \367\002 fpipe /usr/bin/dvips -D 600 -R -q -f + +# compress'd data +0 \037\235 pipe /bin/gzip -cdq + +# packed, gzipped, frozen and SCO LZH data +0 \037\036 pipe /bin/gzip -cdq +0 \037\213 pipe /bin/gzip -cdq +0 \037\236 pipe /bin/gzip -cdq +0 \037\240 pipe /bin/gzip -cdq + +# troff documents +0 .\?\?\040 fpipe `/usr/bin/grog -Tps $FILE` +0 .\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 '.\\\" fpipe `/usr/bin/grog -Tps $FILE` +0 \\\" fpipe `/usr/bin/grog -Tps $FILE` + +# ditroff +0 "x T ps" pipe /usr/bin/grops +0 "x T dvi" pipe /usr/bin/grodvi +0 "x T ascii" pipe /usr/bin/grotty +0 "x T latin1" pipe /usr/bin/grotty +0 "x T lj4" reject Cannot print LaserJet 4 ditroff files. + +# Portable bit-, grey- and pixmaps +0 P1\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P2\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P3\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P4\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P5\n pipe /usr/bin/pnmtops -scale 1000 -dpi 600 2>/dev/null +0 P6\n filter /usr/bin/pnm2ppa -f /etc/ppa/pnm2ppa.conf.hp820 -i - -o - + +# HP Printer Control Language (PCL) -- assume start with reset code +0 \033E\033 reject Cannot print PCL files on this printer. + +# HP Printer Job Language (PJL) +0 \033%-12345X reject Cannot print PJL files on this printer. +0 "@PJL " reject Cannot print PJL files on this printer. +0 @PJL\t reject Cannot print PJL files on this printer. +0 @PJL\r reject Cannot print PJL files on this printer. +0 @PJL\n reject Cannot print PJL files on this printer. + +# GIF files +0 GIF87a pipe /usr/bin/giftopnm 2>/dev/null +0 GIF89a pipe /usr/bin/giftopnm 2>/dev/null + +# JFIF (JPEG) files +0 \377\330\377\340\?\?JFIF\0 pipe /usr/bin/djpeg -pnm + +# TIFF files (the last two bytes of the "magic" is really a version number; +# but the magic is really lame and as far as I have understood the version +# number has never changed and never will, so we include it.) +0 MM\0\x2a fpipe /usr/bin/tiff2ps $FILE +0 II\x2a\0 fpipe /usr/bin/tiff2ps $FILE + +# BMP files (even lousier magic -- Microsoft strikes again!) +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x0c pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x40 pipe \ + /usr/bin/bmptoppm 2>/dev/null +0 BM\?\?\?\?\?\?\?\?\?\?\?\?\x28 pipe \ + /usr/bin/bmptoppm 2>/dev/null + +# Garbage delivered from Windows via Samba +# (donated by Andree Leidenfrost ) +# 300 \033\052\157 cat +# later changed to +# (Bug report #22866: magicfilter: Incorrect magic for Win95/Samba print jobs) +0 \000\000\000\000\000 cat + +# Sun rasterfiles +0 \x59\xa6\x6a\x95 pipe /usr/bin/rasttopnm 2>/dev/null + +# SGI Imagelib (IRIS RGB) files +0 \x1\xda pipe /usr/bin/sgitopnm 2>/dev/null +0 \xda\x1 pipe /usr/bin/sgitopnm 2>/dev/null + +# FIG files; reported by Steven P. Hill +0 #FIG pipe /usr/bin/X11/fig2dev -Lps -P -l dummy + +# +# Standard rejects... things we don't want to print +# + +# Various archive formats +257 ustar\0 reject Attempted to print a tar file. +257 "ustar \0" reject Attempted to print a tar file. +0 07070 reject Attempted to print a cpio file. +0 PK\3\4 reject Attempted to print a zip file. +20 \xdc\xa7\xc7\xfd reject Attempted to print a zoo file. + +# Binaries (Linux): reject with email message +0 \013\1d\0 reject Attempted to print a compiled binary. +0 \100\1d\0 reject Attempted to print a compiled binary. +0 \007\1d\0 reject Attempted to print a compiled binary. +0 \314\0d\0 reject Attempted to print a compiled binary. +0 \177ELF reject Attempted to print an ELF object. +0 \007\001\0 reject Attempted to print an object file. +216 \021\001\0\0 reject Attempted to print a core dump file. +0 ! reject Attempted to print an archive. +0 = reject Attempted to print an archive. + +# Don't confuse this one with troff! +0 .snd reject Attempted to print Sun/NeXT audio data. + +# wacko troff magic +0 ''' fpipe `/usr/bin/grog -Tps $FILE` + +# wild guess: PCL control codes start with +0 \033 reject Cannot print PCL files on this printer. + +# Default entry -- for normal (text) files. MUST BE LAST. +# If you do not have djscript use the other default line or, better, install +# it. MM +# +default pipe /usr/bin/enscript -B -p- diff --git a/debian/etc/ppa/pnm2ppa.conf.hp1000 b/debian/etc/ppa/pnm2ppa.conf.hp1000 new file mode 100644 index 0000000..f613f2c --- /dev/null +++ b/debian/etc/ppa/pnm2ppa.conf.hp1000 @@ -0,0 +1,161 @@ +# Sample configuration file +# +# This file will be automatically read upon startup if it is placed in +# /etc/pnm2ppa.conf +# +# uncomment entries by removing "#" to activate them. +# +#-----------set the printer model--------------------------- +# YOU MUST CHOOSE ONE OF THE FOLLOWING, EVEN IF YOU DO NOTHING ELSE! +# +# If there is more than one "version" entry activated, the last one +# will be used. The printer version can also be set with the command line +# option e.g., "-v 720". + +#version ERROR # PNM2PPA WIIL *NOT* WORK UNTIUL THIS ENTRY IS REMOVED!!!! +#version 720 # 710, 712, 722 also acceptable +#version 820 +version 1000 + + +#--------control system log messages from pnm2ppa------------------- +# pnm2ppa issues progress and error messages to the system log (syslog). +# For security reasons, no input from the user is ever sent to the syslog. +# The setting "silent 1" suppresses messages to the syslog. The +# setting "verbose 1" sends messages to the standard error stream (stderr) +# in addition to the syslog. (Note: on BeOS, syslog messages are +# diverted to stderr; use "silent 1" to suppress them.) +# Note: the "silent 1" keyword is only accepted from the system +# configuration file (/etc/pnm2ppa.conf), and not from configuration files +# specified with the pnm2ppa option "-f". + +#silent 1 +#verbose 1 + +#---------set the margins of the printed page------------------- +# Margins: these are distances from the edges of the paper in +# "dots" ( 600 dots = 1 inch = 2.54 cm). +# Nothing outside these margins will be printed. +# Default values are give below; uncomment and change, if necessary. +# (Older versions of pnm2ppa required larger left and right margins to avoid +# printer failure with "flashing lights", but this problem is believed to +# be solved) + +#topmargin 10 +#bottommargin 150 +#leftmargin 10 +#rightmargin 10 + +#----------center the printer output on the paper------------------- +# Offsets: these are adjustments for centering the print correctly on the +# paper. Units are dots (1/600 inch). Add a positive number of dots to +# xoff to move the printed image to the right, relative to the paper. +# add to yoff to move it down. The helper program calibrate_ppa prints +# a test page to check the offsets (see CALIBRATON.txt): +# usage: "calibrate_ppa --center | pnm2ppa --bw - - | lpr -l +# Default values are: + +#xoffset 160 +#yoffset 50 + +#------------align the black and color ink cartridges-------- +# Color Offsets: these control alignment between the black ink +# and color ink print cartridges. This changes a little whenever you +# replace an ink cartridge, so the default values are just approximate. +# +# Use "calibrate_ppa --align | pnm2ppa --fd - - | lpr -l " +# to print a test page to help you adjust the color offsets. +# +# The first line checks horizontal alignment ColOffsX,: +# The second line checks vertical alignment ColOffsY,: +# The alignment is correct if alignment patterns "0" is best. +# If a diffent alignment pattern is best, add or subtract the + or +# - value shown below it to ColOffsX or ColOffSy. +# +# See CALIBRATION.txt for more details. +# Use "calibrate_ppa --test | pnm2ppa --fd - - | lpr -l " to check your +# new settings. + +#ColOffsX 0 +#ColOffsY 0 + +#---------------"shearing" corrections------------------------------------- +# shearing correction (for bidirectional printing modes) +# if there is a horizontal offset between right-to-left and left-to-right +# sweeps of the print head, adjust these in units of 1"/600 (1 dot). +# There are separate corrections colorshear and blackshear for the +# color and black print heads. The third and fourth lines of the +# alignment test page (see above) tests these. +# The setting is correct when alignments "0" are correct. +# Add or subtract the + or - number shown under the best-aligned shearing +# alignment pattern. + +#colorshear 0 +#blackshear 0 + +#-------------blackness control----------------------------- +# this controls the density of black ink used. +# valid blackness choices are 1 2 3 4; controls the +# density of black ink used: 1 (least ink), 2 (default), 4 (most). +# 0 = no black ink. This affects black ink bordered by whitespace +# only (e.g. text, but not black in color images) + +#blackness 2 + +#------------Color correct curve Gamma parameters------------------------- +# Gamma color correction values for Red, Green and Blue: +# (Note: a more effective method of color correction is to use +# a calibration file /etc/pnm2ppa.gamma, in which case these +# Gamma values will not be used. See COLOR.html or COLOR.txt) +# The pnm2ppa option --noGamma suppresses color correction. + +# The standard Gamma enhancement curve is +# gEnh(i) = (int) ( pow ( (double) i / 256, Gamma ) * 256 ) +# (i.e., 256 times ( i*(1.0/256)) to the power Gamma ), +# where (int) i is the ppm color intensity, in the range 0 - 255. +# positive values of Gamma enhance (increase the intensity of) +# the corresponding color. Gamma = 1.0 corresponds to no +# color correction, gEnh[i] = i. + +# You can specify Gamma values as a decimal number for each primary color + +#GammaR 1.0 # red enhancement +#GammaG 1.0 # green enhancement +#GammaB 1.0 # blue enhancement + +# For use with the printed output of "pnm2ppa -g ", +# you can also specify Gamma values using the integer GammaIdx, +# which gives Gamma = 1.0 - 0.033 * GammaIdx : + +#RedGammaIdx 0 +#GreenGammaIdx 0 +#BlueGammaIdx 0 + +# Default papersize (only used for printing the color calibration +# test page with pnm2ppa -g). +# Valid choices are: a4, letter, legal: + +#papersize letter # this is the default +#papersize legal +#papersize a4 + +#-----------suppress bidirectional printing--------------------- + +# by default the printing sweeps are now bidirectional (unimode 0); +# to make unidirectional printing (left-to-right) the default behavior, +# (unimode 1) uncomment the next line . (The command line options --uni +# and --bi override the default behavior). You might wish to print +# unidirectionally to avoid shearing effects in high-quality +# color images, for example) + +#unimode 1 + +#===================================================================== +# the following are switches for debugging purposes only: +# set their values to 0 to switch off the corresponding ink type: + +#black_ink 1 +#color_ink 1 +#cyan_ink 1 +#magenta_ink 1 +#yellow_ink 1 diff --git a/debian/etc/ppa/pnm2ppa.conf.hp720 b/debian/etc/ppa/pnm2ppa.conf.hp720 new file mode 100644 index 0000000..9edb0f3 --- /dev/null +++ b/debian/etc/ppa/pnm2ppa.conf.hp720 @@ -0,0 +1,161 @@ +# Sample configuration file +# +# This file will be automatically read upon startup if it is placed in +# /etc/pnm2ppa.conf +# +# uncomment entries by removing "#" to activate them. +# +#-----------set the printer model--------------------------- +# YOU MUST CHOOSE ONE OF THE FOLLOWING, EVEN IF YOU DO NOTHING ELSE! +# +# If there is more than one "version" entry activated, the last one +# will be used. The printer version can also be set with the command line +# option e.g., "-v 720". + +#version ERROR # PNM2PPA WIIL *NOT* WORK UNTIUL THIS ENTRY IS REMOVED!!!! +version 720 # 710, 712, 722 also acceptable +#version 820 +#version 1000 + + +#--------control system log messages from pnm2ppa------------------- +# pnm2ppa issues progress and error messages to the system log (syslog). +# For security reasons, no input from the user is ever sent to the syslog. +# The setting "silent 1" suppresses messages to the syslog. The +# setting "verbose 1" sends messages to the standard error stream (stderr) +# in addition to the syslog. (Note: on BeOS, syslog messages are +# diverted to stderr; use "silent 1" to suppress them.) +# Note: the "silent 1" keyword is only accepted from the system +# configuration file (/etc/pnm2ppa.conf), and not from configuration files +# specified with the pnm2ppa option "-f". + +#silent 1 +#verbose 1 + +#---------set the margins of the printed page------------------- +# Margins: these are distances from the edges of the paper in +# "dots" ( 600 dots = 1 inch = 2.54 cm). +# Nothing outside these margins will be printed. +# Default values are give below; uncomment and change, if necessary. +# (Older versions of pnm2ppa required larger left and right margins to avoid +# printer failure with "flashing lights", but this problem is believed to +# be solved) + +#topmargin 10 +#bottommargin 150 +#leftmargin 10 +#rightmargin 10 + +#----------center the printer output on the paper------------------- +# Offsets: these are adjustments for centering the print correctly on the +# paper. Units are dots (1/600 inch). Add a positive number of dots to +# xoff to move the printed image to the right, relative to the paper. +# add to yoff to move it down. The helper program calibrate_ppa prints +# a test page to check the offsets (see CALIBRATON.txt): +# usage: "calibrate_ppa --center | pnm2ppa --bw - - | lpr -l +# Default values are: + +#xoffset 160 +#yoffset 50 + +#------------align the black and color ink cartridges-------- +# Color Offsets: these control alignment between the black ink +# and color ink print cartridges. This changes a little whenever you +# replace an ink cartridge, so the default values are just approximate. +# +# Use "calibrate_ppa --align | pnm2ppa --fd - - | lpr -l " +# to print a test page to help you adjust the color offsets. +# +# The first line checks horizontal alignment ColOffsX,: +# The second line checks vertical alignment ColOffsY,: +# The alignment is correct if alignment patterns "0" is best. +# If a diffent alignment pattern is best, add or subtract the + or +# - value shown below it to ColOffsX or ColOffSy. +# +# See CALIBRATION.txt for more details. +# Use "calibrate_ppa --test | pnm2ppa --fd - - | lpr -l " to check your +# new settings. + +#ColOffsX 0 +#ColOffsY 0 + +#---------------"shearing" corrections------------------------------------- +# shearing correction (for bidirectional printing modes) +# if there is a horizontal offset between right-to-left and left-to-right +# sweeps of the print head, adjust these in units of 1"/600 (1 dot). +# There are separate corrections colorshear and blackshear for the +# color and black print heads. The third and fourth lines of the +# alignment test page (see above) tests these. +# The setting is correct when alignments "0" are correct. +# Add or subtract the + or - number shown under the best-aligned shearing +# alignment pattern. + +#colorshear 0 +#blackshear 0 + +#-------------blackness control----------------------------- +# this controls the density of black ink used. +# valid blackness choices are 1 2 3 4; controls the +# density of black ink used: 1 (least ink), 2 (default), 4 (most). +# 0 = no black ink. This affects black ink bordered by whitespace +# only (e.g. text, but not black in color images) + +#blackness 2 + +#------------Color correct curve Gamma parameters------------------------- +# Gamma color correction values for Red, Green and Blue: +# (Note: a more effective method of color correction is to use +# a calibration file /etc/pnm2ppa.gamma, in which case these +# Gamma values will not be used. See COLOR.html or COLOR.txt) +# The pnm2ppa option --noGamma suppresses color correction. + +# The standard Gamma enhancement curve is +# gEnh(i) = (int) ( pow ( (double) i / 256, Gamma ) * 256 ) +# (i.e., 256 times ( i*(1.0/256)) to the power Gamma ), +# where (int) i is the ppm color intensity, in the range 0 - 255. +# positive values of Gamma enhance (increase the intensity of) +# the corresponding color. Gamma = 1.0 corresponds to no +# color correction, gEnh[i] = i. + +# You can specify Gamma values as a decimal number for each primary color + +#GammaR 1.0 # red enhancement +#GammaG 1.0 # green enhancement +#GammaB 1.0 # blue enhancement + +# For use with the printed output of "pnm2ppa -g ", +# you can also specify Gamma values using the integer GammaIdx, +# which gives Gamma = 1.0 - 0.033 * GammaIdx : + +#RedGammaIdx 0 +#GreenGammaIdx 0 +#BlueGammaIdx 0 + +# Default papersize (only used for printing the color calibration +# test page with pnm2ppa -g). +# Valid choices are: a4, letter, legal: + +#papersize letter # this is the default +#papersize legal +#papersize a4 + +#-----------suppress bidirectional printing--------------------- + +# by default the printing sweeps are now bidirectional (unimode 0); +# to make unidirectional printing (left-to-right) the default behavior, +# (unimode 1) uncomment the next line . (The command line options --uni +# and --bi override the default behavior). You might wish to print +# unidirectionally to avoid shearing effects in high-quality +# color images, for example) + +#unimode 1 + +#===================================================================== +# the following are switches for debugging purposes only: +# set their values to 0 to switch off the corresponding ink type: + +#black_ink 1 +#color_ink 1 +#cyan_ink 1 +#magenta_ink 1 +#yellow_ink 1 diff --git a/debian/etc/ppa/pnm2ppa.conf.hp820 b/debian/etc/ppa/pnm2ppa.conf.hp820 new file mode 100644 index 0000000..7bfab87 --- /dev/null +++ b/debian/etc/ppa/pnm2ppa.conf.hp820 @@ -0,0 +1,161 @@ +# Sample configuration file +# +# This file will be automatically read upon startup if it is placed in +# /etc/pnm2ppa.conf +# +# uncomment entries by removing "#" to activate them. +# +#-----------set the printer model--------------------------- +# YOU MUST CHOOSE ONE OF THE FOLLOWING, EVEN IF YOU DO NOTHING ELSE! +# +# If there is more than one "version" entry activated, the last one +# will be used. The printer version can also be set with the command line +# option e.g., "-v 720". + +#version ERROR # PNM2PPA WIIL *NOT* WORK UNTIUL THIS ENTRY IS REMOVED!!!! +#version 720 # 710, 712, 722 also acceptable +version 820 +#version 1000 + + +#--------control system log messages from pnm2ppa------------------- +# pnm2ppa issues progress and error messages to the system log (syslog). +# For security reasons, no input from the user is ever sent to the syslog. +# The setting "silent 1" suppresses messages to the syslog. The +# setting "verbose 1" sends messages to the standard error stream (stderr) +# in addition to the syslog. (Note: on BeOS, syslog messages are +# diverted to stderr; use "silent 1" to suppress them.) +# Note: the "silent 1" keyword is only accepted from the system +# configuration file (/etc/pnm2ppa.conf), and not from configuration files +# specified with the pnm2ppa option "-f". + +#silent 1 +#verbose 1 + +#---------set the margins of the printed page------------------- +# Margins: these are distances from the edges of the paper in +# "dots" ( 600 dots = 1 inch = 2.54 cm). +# Nothing outside these margins will be printed. +# Default values are give below; uncomment and change, if necessary. +# (Older versions of pnm2ppa required larger left and right margins to avoid +# printer failure with "flashing lights", but this problem is believed to +# be solved) + +#topmargin 10 +#bottommargin 150 +#leftmargin 10 +#rightmargin 10 + +#----------center the printer output on the paper------------------- +# Offsets: these are adjustments for centering the print correctly on the +# paper. Units are dots (1/600 inch). Add a positive number of dots to +# xoff to move the printed image to the right, relative to the paper. +# add to yoff to move it down. The helper program calibrate_ppa prints +# a test page to check the offsets (see CALIBRATON.txt): +# usage: "calibrate_ppa --center | pnm2ppa --bw - - | lpr -l +# Default values are: + +#xoffset 160 +#yoffset 50 + +#------------align the black and color ink cartridges-------- +# Color Offsets: these control alignment between the black ink +# and color ink print cartridges. This changes a little whenever you +# replace an ink cartridge, so the default values are just approximate. +# +# Use "calibrate_ppa --align | pnm2ppa --fd - - | lpr -l " +# to print a test page to help you adjust the color offsets. +# +# The first line checks horizontal alignment ColOffsX,: +# The second line checks vertical alignment ColOffsY,: +# The alignment is correct if alignment patterns "0" is best. +# If a diffent alignment pattern is best, add or subtract the + or +# - value shown below it to ColOffsX or ColOffSy. +# +# See CALIBRATION.txt for more details. +# Use "calibrate_ppa --test | pnm2ppa --fd - - | lpr -l " to check your +# new settings. + +#ColOffsX 0 +#ColOffsY 0 + +#---------------"shearing" corrections------------------------------------- +# shearing correction (for bidirectional printing modes) +# if there is a horizontal offset between right-to-left and left-to-right +# sweeps of the print head, adjust these in units of 1"/600 (1 dot). +# There are separate corrections colorshear and blackshear for the +# color and black print heads. The third and fourth lines of the +# alignment test page (see above) tests these. +# The setting is correct when alignments "0" are correct. +# Add or subtract the + or - number shown under the best-aligned shearing +# alignment pattern. + +#colorshear 0 +#blackshear 0 + +#-------------blackness control----------------------------- +# this controls the density of black ink used. +# valid blackness choices are 1 2 3 4; controls the +# density of black ink used: 1 (least ink), 2 (default), 4 (most). +# 0 = no black ink. This affects black ink bordered by whitespace +# only (e.g. text, but not black in color images) + +#blackness 2 + +#------------Color correct curve Gamma parameters------------------------- +# Gamma color correction values for Red, Green and Blue: +# (Note: a more effective method of color correction is to use +# a calibration file /etc/pnm2ppa.gamma, in which case these +# Gamma values will not be used. See COLOR.html or COLOR.txt) +# The pnm2ppa option --noGamma suppresses color correction. + +# The standard Gamma enhancement curve is +# gEnh(i) = (int) ( pow ( (double) i / 256, Gamma ) * 256 ) +# (i.e., 256 times ( i*(1.0/256)) to the power Gamma ), +# where (int) i is the ppm color intensity, in the range 0 - 255. +# positive values of Gamma enhance (increase the intensity of) +# the corresponding color. Gamma = 1.0 corresponds to no +# color correction, gEnh[i] = i. + +# You can specify Gamma values as a decimal number for each primary color + +#GammaR 1.0 # red enhancement +#GammaG 1.0 # green enhancement +#GammaB 1.0 # blue enhancement + +# For use with the printed output of "pnm2ppa -g ", +# you can also specify Gamma values using the integer GammaIdx, +# which gives Gamma = 1.0 - 0.033 * GammaIdx : + +#RedGammaIdx 0 +#GreenGammaIdx 0 +#BlueGammaIdx 0 + +# Default papersize (only used for printing the color calibration +# test page with pnm2ppa -g). +# Valid choices are: a4, letter, legal: + +#papersize letter # this is the default +#papersize legal +#papersize a4 + +#-----------suppress bidirectional printing--------------------- + +# by default the printing sweeps are now bidirectional (unimode 0); +# to make unidirectional printing (left-to-right) the default behavior, +# (unimode 1) uncomment the next line . (The command line options --uni +# and --bi override the default behavior). You might wish to print +# unidirectionally to avoid shearing effects in high-quality +# color images, for example) + +#unimode 1 + +#===================================================================== +# the following are switches for debugging purposes only: +# set their values to 0 to switch off the corresponding ink type: + +#black_ink 1 +#color_ink 1 +#cyan_ink 1 +#magenta_ink 1 +#yellow_ink 1 diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..b4ac28d --- /dev/null +++ b/debian/manpages @@ -0,0 +1,2 @@ +debian/pnm2ppa.8 +debian/calibrate_ppa.8 diff --git a/debian/pnm2ppa.8 b/debian/pnm2ppa.8 new file mode 100644 index 0000000..16f53ec --- /dev/null +++ b/debian/pnm2ppa.8 @@ -0,0 +1,137 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH pnm2ppa 8 "November 2000" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.\" +.SH NAME +pnm2ppa \- PPM to PPA converter +.SH SYNOPSIS +.B pnm2ppa +.RI [options] +.SH DESCRIPTION +Using pnm2ppa it's possible to run HP-GDI printers on Linux. These printers are normally "Windows-only" and use the PPA protocol which is proprietary. pnm2ppa supports color and is supposed to work faster than pbm2ppa. pnm2ppa supports the following printers: HP Deskjet 7XX Series, HP Deskjet 820 Series and HP Deskjet 1000 Series. +.SH OPTIONS +.TP +.B \-b +bottom margin in 1"/600 (default: 150 = 0.25") +.TP +.B \-\-bi +forces bidirectional print head sweeps +.TP +.B \-B +density of black ink (n = 0,1,2,3 or 4) +.TP +.B \-\-bw +forces black/white output +.TP +.B \-d +dumps the configuration to stdout +.TP +.B \-\-eco +Econofast mode (uses less ink) +.TP +.B \-f +read printer settings from configuration file +.TP +.B \-F +read color correction table from file +.TP +.B \-\-fd +use fast dithering mode +.TP +.B \-g +print color calibration page. See CALIBRATION.txt +.TP +.B \-h, \-\-help displays this help text. +.TP +.B \-i +input from file , "-i -" means stdin +.TP +.B \-l +left margin in 1"/600 (default: 150 = 0.25") +.TP +.B \-\-noGamma +suppresses any color correction +.TP +.B \-o +output to file , "-o -" means stdout +.TP +.B \-p +disable black ink cartridge +.TP +.B \-r +right margin in 1"/600 (default: 150 = 0.25") +.TP +.B \-s +default papersize (a4, legal, letter = us (default)) +.TP +.B \-t +top margin in 1"/600 (default: 150 = 0.25") +.TP +.B \-\-uni +forces unidirectional print head sweeps +.TP +.B \-v +set the printer model (710, 712, 720, 722, 820, or 1000) +.TP +.B \-\-verbose +outputs syslog output to stderr as well +.TP +.B \-\-version +Display the version of pnm2ppa to the syslog +.TP +.B \-x +vertical offset adjustment in 1"/600 +.TP +.B \-y +horizontal offset adjustment in 1"/600 +.TP +The \fB\-v\fR option resets the margins and offset adjustments to the default values for that printer model. and default to stdin and stdout. '-' is a synonym for stdin and stdout. +.SH CONFIGURATION FILES +The order in which parameters are specified is important: The file /etc/pnm2ppa.conf, if it exists, is processed as a configuration file before any command-line parameters are processed. If an alternate configuration file is specified on the command line with the '-f' parameter, its contents are processed at that point. If a parameter is specified more than once, only its last value is used. Configuration files specified with the '-f' parameter have the following format: +.IP +# Comment +.IP + +.IP + +.IP +[etc.] +.TP +Valid keys include: +.IP +version, xoffset, yoffset, topmargin, leftmargin, rightmargin, bottommargin, blackness, papersize +.TP +or any non-null truncated version of these words. Valid values are the same as with the corresponding command-line parameters. +.TP +Other keys that can be set in the configuration file include: +.IP +silent, verbose, unimode, blackshear, colorshear, RedGammaIdx, BlueGammaIdx, GreenGammaIdx, GammaR, GammaG, GammaB, ColOffsX, ColOffsY, black_ink, color_ink, cyan_ink, magenta_ink, yellow_ink +.TP +See documentation in the sample configuration file for their usage. +.SH FILES +.PD 0 +.IR /etc/ppa/gamma.ppm +gamma correction file +.TP +\fI/etc/ppa/pnm2ppa.conf.hp1000\fP, \fI /etc/ppa/pnm2ppa.conf.hp820\fP, \fI /etc/ppa/pnm2ppa.conf.hp720\fP +.TP +Configuration files for the HP1000, HP820, and HP720 Series respectively. +.PD +.SH SEE ALSO +.IR calibrate_ppa (8), +.IR magicfilter (8), +.IR apsfilter(8) diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..1e8d4f2 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,8 @@ +#!/bin/sh -e + +if [ "$1" = purge ] +then + rm -f /etc/magicfilter/pbm2ppa* +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ea6d4bd --- /dev/null +++ b/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f +# This file is public domain software, originally written by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + +CFLAGS=-DLANG_EN -O2 -Wall +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) +CFLAGS+=-g +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) CFLAGS="$(CFLAGS)" + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/bin etc usr/share/man/man1 + + # Add here commands to install the package into debian/ + $(MAKE) install INSTALLDIR=`pwd`/debian/pnm2ppa/usr/bin \ + CONFDIR=`pwd`/debian/pnm2ppa/etc \ + MANDIR=`pwd`/debian/pnm2ppa/usr/share/man/man1 + rm -r debian/pnm2ppa/etc + cp -a debian/etc debian/pnm2ppa + set -e; \ + cd debian/pnm2ppa/etc/magicfilter; \ + chmod 755 *; \ + for m in 1000 720 820; do \ + ln -s pnm2ppa-$$m-bw-filter pbm2ppa-$$m-filter; \ + ln -s pnm2ppa-$$m-bw-eco-filter pbm2ppa-draft-$$m-filter; \ + done + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs docs lpd pdq + cd debian/pnm2ppa/usr/share/doc/pnm2ppa/docs/en && rm LICENSE *.1 + dh_installexamples sample_scripts/* *.ps + perl -pi -e 'print "#!/bin/sh -e\n" if $$. == 1; close ARGV if eof;' \ + debian/pnm2ppa/usr/share/doc/pnm2ppa/examples/lpr* + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented calibrate_ppa.1 + dh_installchangelogs Changelog + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install