source: trunk/packs/config/ifhp.conf @ 13330

Revision 13330, 28.0 KB checked in by danw, 25 years ago (diff)
Run files through third/lprng/athena/check_unprintable and print rejection notices for files it doesn't like, rather than assuming that anything that isn't PS, PJL, or PCL is text.
Line 
1## The Master /etc/ifhp.conf File
2## Assumes that we are generating output for a HP LaserJet Family Printer
3## $Id: ifhp.conf,v 1.3 1999-06-30 22:54:02 danw Exp $
4##
5## You should define your options in a ifhp.conf file in the spool
6## directory,  or use the printcap ifhp=.... entry to get the options
7## Comment have ## or #-- at the start of the line
8##  commented out options have only # at the start of line
9
10#--- START debugging setup
11## turn debugging on
12# debug=5
13## specify a specific file for output
14#dev=/tmp/d
15## specify a network connection
16# dev=astart14%9100
17## specify a serial line
18# dev=/dev/ttya
19#stty=38400 -echo -crmod -raw -oddp -evenp ixon pass8 -ixany cbreak
20
21## put trace output on STDERR
22# trace
23## specify status file for testing
24#--- END debugging setup
25
26## The summary file really slows down operation as it requires
27## a file system sync each time.  Writing to a UDP socket is very
28## fast
29# summaryfile=summary
30
31## Status file location and limits in K bytes
32##
33# statusfile=status
34statusfile_max=8
35statusfile_min=2
36
37#--- START language setup
38## default is to turn everything on
39pjl
40pcl
41ps
42text@
43## do CRLF translation
44crlf
45
46## These are for very ugly printers that have some strange problems
47##  with PCL and PS end of job at the start of jobs.  If it is present,
48##  the PJL settings are ignored,  or the rest of the job may be
49##  ignored.  This also happens when you use a Microsoft product and the
50##  print driver puts ^D at the start of PostScript jobs.  You have been
51##  warned.
52##
53## Do NOT put PCL EOJ at start of job when PCL supported
54# no_pcl_eoj
55#
56## Do NOT put PS EOJ at start of PS when PS is being printed
57# no_ps_eoj
58
59## Some printers get very upset when PostScript jobs contain ^T or ^C
60## characters.  You can remove various control character by setting
61## their values in this string:
62##  remove_ctrl=TC   will remove CTRL-T and CTRLC characters
63##  This is only done for PostScript jobs.
64
65remove_ctrl=TC
66
67
68## Some printers insist on using the Tagged Binary Commmunication Protocol
69## to support sending embedded PS file.  If you need to use TBCP, enable this.
70## This flag is inherently evil,  and is for desperate uses only,
71## and should not be generally enabled.
72##
73## If you don't know what this is about,  don't mess with it.
74##    You, as they say,  have been warned.
75##
76# tbcp
77
78#--- END lanuage setup
79
80
81#--- START accounting extra information
82##  For those little moments of quiet desperation when you need to have the
83##  actual printing filter do some accounting.  Why?  because you may need to
84##  check with some specialized database,  update the information in it.
85##
86## Again,  this is inherently evil,  and is for desperate sysadmins who are
87## trying to placate the bean counters in administration...
88## If you don't know what this is about,  don't mess with it.
89## You, as they say,  have been warned.  Also,  read the source code
90## as well.
91##
92
93##
94## accounting script
95# accounting=accounting.sh
96#--- END accounting extra information
97
98#--- START printer status, sync, and pagecount
99## information reporting
100## status@ will suppress any reading of status information.  This can
101##  have ugly side effects if your programs send status back on a TCP/IP
102##  link,  it is not read,  the printers output buffer becomes full,
103##  and the printer will lock up.  Use this ONLY if you must.
104##  If you want the effects of status@,  but do not want to 'actively'
105##  expect status back,  use sync@,pagecount@ instead
106##
107status
108
109## sync@     - no sync
110## sync      - if pjl availble us it, then if ps available use it
111##             this is best method to sync
112## sync=ps   - use ps method
113## sync=pjl  - use pjl method
114sync
115## try sending sync at these intervals
116#
117sync_interval=20
118
119## pagecount@     - no sync
120## pagecount      - if pjl availble us it, then if ps available use it
121##             this is best method to sync
122## pagecount=ps   - use ps method
123## pagecount=pjl  - use pjl method
124pagecount
125##  If your printer does not have a reliable way to determine that
126## the last job has finished,  you can 'poll' it at intervals.
127## The page count will be sampled at 'pagecount_poll' intervals
128## until it is stable.
129##  This is for desperation only
130#pagecount_poll=5
131
132##  You may need to periodically resend the pagecount command
133## if you do not get a response.  This will do so.  You may have problems
134## with jobs that take a very long time to process and which do not have
135## reliable 'end of job' indications.
136
137pagecount_interval=20
138
139##  We will send a 'sync' query at then end of job to determine if a job has
140##  finished.  However, if you do not want to do this, then set
141##  waitend@ . Suppressing waitend is DANGEROUS if you expect to
142##  get error status back.
143waitend
144
145## interval to send queries - this can be pretty long as many times
146##  you will need to wait until the job finishes.  You do not want to
147##  send too many of these
148##
149waitend_interval=300
150
151## how often to report progress - minimum of percent or
152##  amount written (in Kbytes)
153##  report when you have done this much more percent of the job
154progress_pc=25
155##  report when you have done this much more Kbytes of job
156progress_k=1000
157
158#--- END printer status, sync, and pagecount
159
160#--- START OF Banner
161##  If we want to have the ifhp filter generate a banner,
162##  then we need to specify what format for the banner
163##  This is ugly, ugly, ugly.
164##  I don't know why I did this,  given that LPRng does better
165##  banners.  This may come out
166#banner=ps
167#banner=pcl
168banner@
169#banner_file=/usr/athena/lib/filters/psbanner.ps
170#--- END OF Banner
171
172
173## START PJL configuration
174
175## only allow these PJL commands
176##
177pjl_only=[
178    COMMENT DEFAULT DINQUIRE ECHO ENTER EOJ
179    FSAPPEND FSDIRLIST FSQUERY FSUPLOAD FSDELETE FSDOWNLOAD FSINIT FSMKDIR
180    INFO INITIALIZE INQUIRE JOB OPMSG PJL RDYMSG
181    RESET SET STMSG USTATUS USTATUSOFF
182## special builtins that expand variables correctly
183    COPIES
184 ]
185
186## do NOT allow these PJL commands, even if they are in pjl_only
187pjl_except=[ ]
188
189## BUILTIN PJL Support
190##  pjl_enter - printer supports language selection
191pjl_enter
192##  pjl_job -   printer supports PJL JOB
193pjl_job
194##  pjl_console -   printer supports PJL console setting
195pjl_console
196
197## expand the following on startup,  after the builtin
198pjl_init=[ ustatus teoj ]
199
200## expand the following on termination,  after the builtin
201pjl_term=[ ustatus teoj ]
202
203## You can, if you are feeling very odd, force a file
204##  to be send as part of the PJL setup
205##  1. add setup to pjl_user_opts if you want user specified files
206##    specify this with -Tsetup=filename
207##  2. put setup=filename in pjl_init=[ ... ] list
208##    if you want it permanently set up
209##  The setup will get expanded to font_download=filename
210##    and the actual file will come from ${pjl_fontdir}/filename
211##  This keeps users from downloading /etc/passwd to your printer
212
213pjl_fontdir=/usr/athena/lib/fonts/pjl
214pjl_setup=[ font_download=\%s{setup} ]
215## default value for testing or insurance
216setup=test
217
218##   PJL USTATUS command string
219##    This usually will force job status to be sent at 10
220##   second intervals,  which is pretty useful for a keepalive
221pjl_ustatus=
222    @PJL USTATUS OFF
223    @PJL USTATUS JOB = ON
224    @PJL USTATUS DEVICE = ON
225    @PJL USTATUS PAGE = ON
226    @PJL USTATUS TIMED = 10
227
228##   If your printer has 'True End of Job'  then this is useful.
229##  The TEOJ is an undocumented option for PJL that forces JOB
230##  status to be delayed until the job has been totally printed.
231##  Sometimes it works,  usually does not
232##
233pjl_teoj= @PJL TEOJ = ON
234
235
236## PJL Variables supposedly supported by HP and others
237##  Your milage may vary.  More may be added as time goes on
238##  Note:  the pjl_vars_set += [ ... ] format may soon
239##  allow additional values to be added
240
241pjl_vars_set= [
242    AUTOCONF AUTOSELECT BINDING=LONGEDGE BITSPERPIXEL CLEARABLEWARNINGS
243    CONTEXTSWITCH COURIER=REGULAR CPCLOCK DENSITY DISKLOCK
244    DUPLEX ECONOMODE FINISH FORMLINES=60
245    IMAGEADAPT INTRAY1 INTRAY2
246    INTRAY1SIZE INTRAY2SIZE INTRAY3SIZE INTRAY4SIZE
247    INTRAY5SIZE INTRAY6SIZE INTRAY7SIZE INTRAY8SIZE
248    IOBUFFER IOSIZE JOBATTR JOBOFFSET
249    LANG=ENGLISH LOWTONER MANUALFEED
250    MEDIASOURCE MEDIATYPE MPTRAY ORIENTATION=PORTRAIT OUTBIN=UPPER
251    OUTLINEPOINTSIZE PAGEPROTECT
252    PAPER=LETTER PARALLEL PERSONALITY=AUTO POWERSAVE POWERSAVETIME=30
253    PRINTQUALITY=NORMAL QTY=1 RENDERMODE REPRINT=AUTO RESOLUTION
254    RESOURCESAVE RESOURCESIZE RET TIMEOUT=600 WIDEA4
255 ]
256
257##
258## Commands we have created:  upper, lower
259## PJL Options we can set: autoselect autoconf
260##
261
262pjl_user_opts=[ inupper inlower outupper duplex outlower autoselect
263    autoconf transparency setup copies landscape portrait ]
264
265## Your milage may vary on these,  but supposedly most PJL aware
266## printers will either support or ignore them
267##
268
269pjl_inupper=@PJL SET MEDIASOURCE = TRAY1
270pjl_inlower=@PJL SET MEDIASOURCE = TRAY2
271pjl_outupper=@PJL SET OUTBIN = UPPER
272pjl_outlower=@PJL SET OUTBIN = LOWER
273pjl_copies=@PJL SET COPIES = \%{copies}
274pjl_transparency=@PJL SET MEDIATYPE = TRANSPARENCY
275pjl_landscape=@PJL SET ORIENTATION = LANDSCAPE
276pjl_portrait=@PJL SET ORIENTATION = PORTRAIT
277
278## PJL USTATUS information will include a lot of
279## codes that are just not interesting,  such as 'printer on line',
280## or 'power up'.  You can suppress reporting status for these codes
281## by putting their code numbers in this list
282
283pjl_quiet_codes=[
284    10001
285 ]
286
287## Special error messages
288##  One per line
289##  The idea is that you may get an error code,  but you
290## it is not 'standard'.  You can add additional codes here
291## or override the default strings in the ifhp source.
292##
293pjl_error_codes=[
294    10006=Toner Low
295 ]
296
297#--- END of PJL
298
299#--- START of PostScript
300
301## PostScript Information
302##    WARNING - YOUR POSTSCRIPT PRINTER MAY NOT ACCEPT
303##  SOME OF THE COMMANDS HERE.  Check the printer PostScript Printer
304##  Description File for details.
305
306## use the following string to cause the printer to echo
307## ifhp will replace NAME by a unique identifier to make sure
308## that the latest echo was detected
309
310ps_status_code=
311    %!PS-Adobe-2.0
312## for PS Level 3 add:
313#   false 0 startjob pop
314    ( %%[ echo: NAME ]%% ) print () = flush
315
316##  PageCount
317##   This is a very nasty piece of PostScript that will
318##  get the current pagecount value out of the statusdict
319##  Note: you really should use the PS Level 3 if you have it
320##  Note: some printers INSIST on ignoring the startjob stuff,
321##    and will report the current pagecount.  You sometimes need
322##    to sit in a loop and wait until it stops changing.
323##    See pagecount_interval and pagecount_timeout
324
325ps_pagecount_code=
326    %!PS-Adobe-2.0
327## for PS Level 3 add:
328#   false 0 startjob pop
329    /p{print}def ( %%[ pagecount: ) p
330    statusdict begin pagecount end 20 string cvs p
331    ( ]%% ) p () = flush
332
333## PostScript options allowed by -T or -Z
334##
335
336ps_user_opts=[ manual inupper inlower outupper outlower envelope mediaselect
337    simplex duplex duplexshort font transparency
338        letter legal ledger oversize a3 a4 a5
339    ]
340
341## support for font download
342##  use:  -Tfont=name1,font=name2
343##  This will get expanded to fontdownload
344##  and fontdownload will get the ${font} value set by font=
345##  the ps_fontdir value will be prefixed,  and
346##   ${ps_fontdir}/name1  and ${ps_fontdir}/name2 will be downloaded
347##  to the printer
348##   
349ps_fontdir=/usr/athena/lib/fonts/ps
350ps_font=[ font_download ]
351
352
353## Support for PostScript based page settings
354## YOU NEED TO CHECK YOUR PPD FILE FOR THIS STUFF
355##
356ps_duplex=   statusdict begin true setduplexmode false settumble end
357ps_lduplex=  statusdict begin true setduplexmode false settumble end
358ps_sduplex=  statusdict begin true setduplexmode true settumble end
359ps_simplex=  statusdict begin false setduplexmode end
360ps_inupper=  statusdict begin 0 setpapertray end
361ps_inlower=  statusdict begin 1 setpapertray end
362ps_manual=   statusdict begin /manualfeed true store end
363ps_envelope= statusdict begin com10envelopetray end
364ps_outupper= statusdict begin 0 setoutputtray end
365ps_outlower= statusdict begin 1 setoutputtray end
366ps_transparency= <</MediaType (Transparency)>> setpagedevice
367
368mediaselect=3
369ps_mediaselect=<</DeferredMediaSelection true /MediaPosition \%{mediaselect}>> setpagedevice
370
371
372#--- END PostScript
373
374#--- START PCL
375
376
377##   Initialization
378
379pcl_user_opts=[
380    bold clearmargins courier crlf delete_fonts duplex duplexback
381    duplexfront duplexselect duplexshort fixed font font_id
382    font_op font_primary height helvetica hmi init
383    init inlower inupper italic jobseparation landscape leftmargin
384    leftoffset lineprinter linesperpage linewrap lpi manual normalpage
385    orientation outlower outupper pc8 pagesize pitch portrait proportional
386    rightmargin simplex source style symbol_set topmargin topoffset
387    typeface user_opts vmi weight
388    pagesize letter legal ledger a3 a4 a5
389 ]
390
391## turn LF into CRLF
392pcl_crlf=\033&k2G
393## turn line wrap on
394pcl_linewrap=\033&s0C
395
396## page (job) size
397##  use -Zpagesize=n
398## 1 - executive, 2 - letter, 3 - legal, 6 - ledger, 25 - A5, 26 - A4, 27 - A3
399## 80 - Monarch Envelope, 81 - Comm. 10 Envelope, 90 - Intl. DL Envelope
400## 91 - Intl. C5 Envelope, 100 - Intl. D5 Envelope, 101 - Custom
401## 71 - Hagaki Postcard, 72 - Oufuku-Hagaki Postcard
402pagesize=2
403pcl_pagesize=\033&l\%{pagesize}A
404pcl_letter=\033&l2A
405pcl_legal=\033&l3A
406pcl_ledger=\033&l6A
407pcl_a5=\033&l25A
408pcl_a4=\033&l26A
409pcl_a3=\033&l27A
410
411## paper source selection
412##   use -Zsource=n
413## 0 - current, 1 - upper, 2 - manual paper, 3 - manual envelope
414## 4 - lower,   5 - optional paper  - 6 - optional manual
415source=0
416pcl_source=\033&l\%{source}H
417pcl_inupper=\033&l1H
418pcl_manual=\033&l2H
419pcl_inlower=\033&l4H
420
421## orientation
422##  0 - portrait, 1, landscape, 2 - reverse portrait, 3 reverse landscape
423pcl_orientation=\033&l\%{orientation}O
424pcl_portrait=\033&l0O
425pcl_landscape=\033&l1O
426
427## simplex or duplex
428##  0 - simplex,  1 - duplex long edge, 2 - duplex short edge
429pcl_simplex=\033&l0S
430pcl_duplex=\033&l1S
431pcl_duplexshort=\033&l2S
432
433## offsets
434##  these are specified in 1/720 inch units
435##  i.e. - if you want 1/2 inch, you need  720 x .5 = 360 units
436leftoffset=0
437pcl_leftoffset=\033&l\%{leftoffset}U
438topoffset=0
439pcl_topoffset=\033&l\%{topoffset}Z
440
441## duplex page side selection
442duplex_select=1
443pcl_duplexselect=\033&a\%{duplexselect}G
444pcl_duplexfront=\033&a1G
445pcl_duplexback=\033&a2G
446
447## job separaton
448pcl_jobseparation=\033&l1T
449
450## output bin
451## 0 - auto, 1 - bin 1,top/facedown 2 - bin 2,left/faceup
452## 3 - bin 3 (HCO faceup)
453## 4 - bin 4 (HCO 1, facedown)
454## 5 - bin 5 (HCO 2, facedown)
455## 6 - bin 6 (HCO 3, facedown)
456## 7 - bin 7 (HCO 4, facedown)
457## 8 - bin 8 (HCO 5, facedown)
458## 9 - bin 9 (HCO 6, facedown)
459## 10 - bin 10 (HCO 7, facedown)
460## 11 - bin 11 (HCO 8, facedown)
461
462outbin=1
463pcl_outbin=\033&l\%{outbin}G
464pcl_outupper=\033&l1G
465pcl_outlower=\033&l2G
466
467## margins
468pcl_clearmargins=\0339
469leftmargin=0
470pcl_leftmargin=\033&a\%{leftmargin}L
471rightmargin=80
472pcl_rightmargin=\033&a\%{rightmargin}M
473topmargin=0
474pcl_topmargin=\033&l\%{topmargin}E
475linesperpage=66
476pcl_linesperpage=\033&l\%{linesperpage}F
477
478## the HMI (Horizontal Motion Index)
479##  this is dangerous...
480##  This is the number of 1/120 inch unit per character
481##  i.e. - 120 unit per inch
482##  If you want 10 cpi, you want HMI = 120/10 = 12
483hmi=12
484pcl_hmi=\033&k\%{hmi}H
485
486## the VMI (Vertical Motion Index)
487##  this is dangerous...
488##  This is the number of 1/48 inch unit per line
489##  i.e. - 48 unit per inch
490##  If you want 6 lines per inch, you want HMI = 48/6 = 8
491vmi=8
492pcl_vmi=\033&l\%{vmi}C
493
494## the LPI (Lines Per Inch) - inverse of VMI
495##  This is the lines per line
496##  If you want 6 lines per inch, you want LPI = 6
497lpi=6
498pcl_lpi=\033&l\%{lpi}D
499
500## symbol set
501##  - don't fool around with this one...
502## 10U = PC 8 - shows the funny PC characters???
503##
504symbol_set=8U
505pcl_symbol_set=\033(\%{symbol_set}
506pcl_pc8=\033(10U
507
508## spacing
509##  0 - fixed, 1 - proportional
510pcl_fixed=\033(s0P
511pcl_proportional=\033(s1P
512
513## pitch for fixed spaced font
514##  in characters per inch
515pitch=10
516pcl_pitch=\033(s\%3.2f{pitch}H
517
518## height for proportional spaced font
519##  in points
520height=10
521pcl_height=\033(s\%3.2f{height}H
522
523## style for proportional spaced font
524##  0 - normal, 1 - italic, 4 condensed, etc
525style=0
526pcl_style=\033(s\%{style}S
527pcl_italic=\033(s1S
528
529
530## weight -
531##  ranging from -7 (ultra thin) to 7 (ultra black)
532weight=0
533pcl_weight=\033(s\%{weight}B
534pcl_bold=\033(s3B
535
536## Typeface Family
537## See Appendic C in the PCL 5 comparison guide
538##   consists of foundary * 4096 + fontid
539##   foundary = 1 - AGFA, 2- Bitstream, etc
540##   fontid   = 0 - line printer, 3 = courier, 4 = helvetica
541##   id 4099 - Courier
542##      4100 - Helvetica
543##
544typeface=4099
545pcl_typeface=\033(s\%{typeface}T
546pcl_courier=\033(s4099T
547pcl_helvetica=\033(s4100T
548pcl_lineprinter=\033(s0T
549
550
551##
552## Fonts and Font Downloading
553##  fontid is used to set the current font
554font_id=1
555pcl_font_id=\033*c\%{font_id}D
556## set primary font
557font_primary=1
558pcl_font_primary=\033(\%{font_primary}X
559
560## font control
561##
562font_op=0
563pcl_font_op=\033*c\%{font_op}F
564pcl_delete_fonts=\033*c0F
565
566## font directory
567font=c1201b.10
568pcl_fontdir=/usr/athena/lib/fonts/pcl
569
570## combination command
571pcl_font=[ delete_fonts font_id font_download font_primary ]
572
573## canned setup
574pcl_normalpage=[ letter crlf linewrap portrait clearmargins fixed pitch=10 courier ]
575
576pcl_init=[ normalpage ]
577
578##
579## text conversion control
580##
581## control text to whatever conversion
582##
583## if you cannot find type, then try this file utility
584##
585## if the type is text and not supported on your system, do a conversion
586##
587##  Method 1 - set 'default_language' as text, and run
588##    the program through a text to known converter
589## the a2ps utility is available from:
590##   A2PS - Ascii Text to PostScript Converter
591##      http://www-inf.enst.fr/~demaille/a2ps
592##      ftp://ftp.enst.fr/pub/unix/a2ps/
593##
594##  You can also use nscript:
595##      ftp.gnu.org:gnu/nscript/
596##
597## The a2ps options -q -B -1 -M Letter --borders=no -o-
598##  will do: -q   = quiet, no message
599##           -1   = 1 virtual (page?)
600##           -B   = no header
601##           -M Letter = use letter size paper
602##           --borders=no  = no borders
603##           -o-  = output to STDOUT
604##  Similar options seem to work for enscript as well.
605
606##   NOTE:  the option values ZOPTS  and TOPTS will get replaced with
607##   -Zzoptions and -Ttoptions respectively,  allowing you to do the
608##   necessary PostScript fixes based on options as well
609
610##
611## 
612##  Method 2 -
613##    Use the file util and match the output
614##  if default_language = unkown then  invoke 'file' and then
615##  use the pattern match of the output.
616##  The file_output_match[] entries are 1 per line with the format:
617##   glob  output_format  /pathtoconverter option option option
618##  Spaces in the output can be matched with %20 (URL escaped space)
619## Example:
620## file_output_match = [
621## *text*  ps /usr/local/bin/a2ps -q -B -1 -M Letter --borders=no -o-
622##                   300dpi@8inches = 2400 pixels
623##                   300dpi@11inches = 3300 pixels
624## *%20gif%20*  pcl /usr/local/bin/gif2pcl --autosize -x 2400 -y 3300 -d=300 -o-
625## ]
626
627##   NOTE:  the option values ZOPTS  and TOPTS will get replaced with
628##   -Zzoptions and -Ttoptions respectively,  allowing you to do the
629##   necessary PostScript fixes based on options as well
630##   For example,  if the filter was /usr/local/bin/mystuff ZOPTS
631##   and you did lpr -Zlandscape,  then you would get
632##     /usr/local/bin/mystuff -Zlandscape.  This would allow you to
633##   process the text file appropriately
634
635##
636##  file - utility to determine file type
637##     ftp://ftp.astron.com/pub/file/
638##     ftp.deshaw.com/pub/file/
639##     Also available from the RedHat.com SRPMS in (of course) rpm format
640##
641## file reports format information
642##   
643##  glob text_output_format text_converter
644##
645## For method 1,  set default_language=text
646# default_language=text
647## For method 1,  set default_language=unknown
648default_language=unknown
649
650##  Method 1 text converter program
651# text_converter=/usr/athena/libexec/filters/textps
652## output of the converter is pcl, ps, or raw
653# text_converter_output=ps
654
655##  Method 2 file utility path
656file_util_path=/usr/athena/libexec/filters/check_unprintable
657##  Method 2 patterns and outputs
658file_output_match = [
659 *text*  ps /usr/athena/libexec/filters/textps
660 *       ps /usr/athena/libexec/filters/reject_unprintable -
661]
662## you may need a temp file location
663##
664##  This will be extended to ..ifhpXXXXX
665##   for use by the unix mktemp() routine
666##
667tempfile=/var/tmp/ifhp
668
669## Printer Specific Configurations
670
671## Apple or PostScript Printers
672[ apple postscript ps ]
673pjl@
674pcl@
675ps
676text@
677
678## HP Printers
679## These all support PJL to a limited extent and PCL as well
680###
681[ hp hpiiisi ]
682pjl_only=[
683    COMMENT ENTER
684 ]
685
686[ hp4 hp4m hp4si hp4simx hp4plus hp4mplus hp4v hp4mv hp4p hp4mp hp4pj hpljpro hp4lc ]
687pjl_except=[
688    FSAPPEND FSDIRLIST FSQUERY FSUPLOAD FSDELETE FSDOWNLOAD FSINIT FSMKDIR
689 ]
690
691[ hp4v hp4mv ]
692# Paper Selection By Size
693ps_letter= <</DeferredMediaSelection true /PageSize [612 792] /ImagingBBox null>> setpagedevice
694ps_legal= <</DeferredMediaSelection true /PageSize [612 1008] /ImagingBBox null>> setpagedevice
695ps_ledger=<</DeferredMediaSelection true /PageSize [792 1224] /ImagingBBox null>> setpagedevice
696ps_oversize=<</DeferredMediaSelection true /PageSize [842 1274] /ImagingBBox null>> setpagedevice
697ps_a3 = <</DeferredMediaSelection true /PageSize [842 1191] /ImagingBBox null>> setpagedevice
698ps_a4 = <</DeferredMediaSelection true /PageSize [595 842] /ImagingBBox null>> setpagedevice
699
700
701[ hp4l hp5l hp6l ]
702pjl_except=[
703    EOJ JOB OPMSG RDYMSG STMSG
704    FSAPPEND FSDIRLIST FSQUERY FSUPLOAD FSDELETE FSDOWNLOAD FSINIT FSMKDIR
705 ]
706
707[ hp4ml hp5p hp5mp hp6p hp6mp ]
708pjl_except=[
709    OPMSG RDYMSG STMSG
710    FSAPPEND FSDIRLIST FSQUERY FSUPLOAD FSDELETE FSDOWNLOAD FSINIT FSMKDIR
711 ]
712
713######### HP 5 SI MX
714#########  These may NOT work on other printers
715[ hp5si hp5simx hp5 hp5m ]
716pjl_except=[
717    FSAPPEND FSDIRLIST FSQUERY FSUPLOAD
718 ]
719ps_manual=<</ManualFeed true>> setpagedevice
720ps_envelope=<</DeferredMediaSelection true /MediaPosition 2>> setpagedevice
721
722
723## HP 5SiMX
724ps_inupper=[ tray1 ]
725ps_inlower=[ tray2 ]
726
727
728## *InputSlot Tray1/Tray 1:
729ps_tray1=<</DeferredMediaSelection true /MediaPosition 3>> setpagedevice
730
731##InputSlot Tray2/Tray 2:
732ps_tray2=<</DeferredMediaSelection true /MediaPosition 0>> setpagedevice
733
734##InputSlot Tray3/Tray 3:
735ps_tray3=<</DeferredMediaSelection true /MediaPosition 1>> setpagedevice
736
737##InputSlot Tray4/Tray 4:
738ps_tray4=<</DeferredMediaSelection true /MediaPosition 4>> setpagedevice
739
740## *OutputBin Upper/Top Output Bin (Face Down):
741##ps_outupper=<</Staple 0 /OutputType (TOP OUTPUT BIN)>> setpagedevice
742## *OutputBin Left/Left Output Bin (Face Up):
743##ps_outlower=
744##   currentpagedevice /OutputAttributes get
745##   5 known
746##         {<</Staple 0 /OutputType (FACE UP BIN)>> setpagedevice}
747##         {<</Staple 0 /OutputType (LEFT OUTPUT BIN)>> setpagedevice}
748##       ifelse
749##
750## *OutputBin Stacker/Stacker (Face Down):
751ps_outbin2=<</Staple 0 /OutputType (OPTIONAL OUTBIN 2)>> setpagedevice
752
753## *OutputBin Separator/Job Separator (Face Down):
754ps_outbin3=<</Staple 0 /OutputType (OPTIONAL OUTBIN 2)>> setpagedevice
755
756## *OutputBin Stapler/Stapler (Face Down):         
757ps_outbin4=<</Staple 2>> setpagedevice
758
759## *OutputBin OutputBin1/Mailbox 1 (Face Down):   
760ps_outbin5=<</Staple 0 /OutputType (OPTIONAL OUTBIN 2)>> setpagedevice
761
762## *OutputBin OutputBin2/Mailbox 2 (Face Down):   
763ps_outbin6=<</Staple 0 /OutputType (OPTIONAL OUTBIN 3)>> setpagedevice
764
765## *OutputBin OutputBin3/Mailbox 3 (Face Down):   
766ps_outbin7=<</Staple 0 /OutputType (OPTIONAL OUTBIN 4)>> setpagedevice
767
768## *OutputBin OutputBin4/Mailbox 4 (Face Down):   
769ps_outbin8=<</Staple 0 /OutputType (OPTIONAL OUTBIN 5)>> setpagedevice
770
771## *OutputBin OutputBin5/Mailbox 5 (Face Down):   
772ps_outbin9=<</Staple 0 /OutputType (OPTIONAL OUTBIN 6)>> setpagedevice
773
774## *Duplex None/Off:
775ps_simplex=
776     <</Duplex false /Tumble false>> setpagedevice
777## *Duplex DuplexNoTumble/Long-Edge Binding:
778ps_duplex=
779     <</Duplex true /Tumble false>> setpagedevice
780## *Duplex DuplexTumble/Short-Edge Binding:
781ps_duplexshort=
782     <</Duplex true /Tumble true>> setpagedevice
783
784[ hp5simopier hp4000 hp4500c hp5000 hp8000 ]
785pjl_except= [
786 ]
787
788[ hpcolorlj hpcolorlj5 hpcolorlj5m ]
789pjl_only=[
790    COMMENT ECHO ENTER EOJ
791    INFO INITIALIZE INQUIRE JOB PJL RDYMSG
792    USTATUS USTATUSOFF
793 ]
794
795[ hpdj1200c hppjxl300 ]
796pjl_only=[
797    COMMENT ENTER
798    PJL
799 ]
800status@
801
802[ hpdj1600c ]
803pjl_only=[
804    COMMENT DEFAULT DINQUIRE ECHO ENTER EOJ
805    JOB PJL
806    RESET SET
807]
808[ hpdj200 hpdj220 hpdj350c hpdj600 hpdj650c ]
809pjl_only=[
810    COMMENT ECHO ENTER
811    INFO
812    USTATUS USTATUSOFF
813 ]
814[ hpdj230 hpdj250c hpdj330 hpdj350c hpdj430 hpdj450c hpdj455ca hpdj700 hpdj750c hpdj750cplus hpdj755cm hpdj2000cp hpdj2500cp ]
815pjl_only=[
816    COMMENT ECHO ENTER EOJ
817    INFO JOB RESET SET
818    USTATUS USTATUSOFF
819 ]
820
821##
822##  QMS Printers do not seem to return status or other information
823##  you may need to configure them to connect on port 35
824## printcap
825##  lp:ifhp=model=qms1725,dev=qms.printer.ip.addr%35
826##    :lp=/dev/null
827##    :if=..../ifhp
828##
829[ qms1725 ]
830appsocket
831status@
832pjl@
833pcl@
834ps
835text@
836#*DefaultDuplex: None
837#*Duplex None: statusdict begin false setduplexmode false settumble end
838ps_simplex=statusdict begin false setduplexmode false settumble end
839#*Duplex DuplexNoTumble: statusdict begin true setduplexmode false settumble end
840ps_duplex=statusdict begin true setduplexmode false settumble end
841#*Duplex DuplexTumble: statusdict begin true setduplexmode true settumble end
842ps_lduplex=statusdict begin true setduplexmode true settumble end
843
844#*InputSlot Upper: statusdict begin 1 setpapertray end
845ps_inupper=statusdict begin 1 setpapertray end
846#*InputSlot Lower: statusdict begin 2 setpapertray end
847ps_inlower=statusdict begin 2 setpapertray end
848#*InputSlot Envelope: statusdict begin 3 setpapertray end
849ps_envelope=statusdict begin 3 setpapertray end
850
851ps_manual=   1 dict dup /ManualFeed true put setpagedevice
852
853#*OutputBin Upper: statusdict begin 1 setoutputray end
854#*OutputBin Back: statusdict begin 2 setoutputtray end
855
856ps_outupper= statusdict begin 1 setoutputray end
857ps_outlower= statusdict begin 2 setoutputtray end
858
859# QMS 2025 appears to be HP compatible
860# QMS 860 has same tray as QMS2025
861[ qms2025 qms860 ]
862appsocket
863status@
864pjl@
865pcl
866ps
867text@
868#*PageSize Letter: statusdict begin lettertray end
869ps_letter=statusdict begin lettertray end
870#*PageSize Legal: statusdict begin legaltray end
871ps_legal=statusdict begin legaltray end
872#*PageSize Tabloid: statusdict begin 11x17tray end
873ps_ledger=statusdict begin 11x17tray end
874#*PageSize Executive: statusdict begin executivetray end
875ps_executive=statusdict begin executivetray end
876#*PageSize A3: statusdict begin a3tray end
877ps_a3=statusdict begin a3tray end
878#*PageSize A4: statusdict begin a4tray end
879ps_a4=statusdict begin a4tray end
880#*PageSize A5: statusdict begin a5tray end
881ps_a5=statusdict begin a5tray end
882#*PageSize B4: statusdict begin b4tray end
883ps_b4=statusdict begin b4tray end
884#*PageSize B5: statusdict begin b5tray end
885ps_b5=statusdict begin b5tray end
886#*PageSize B6: statusdict begin b6tray end
887ps_b6=statusdict begin b6tray end
888
889
890## Tektronix Color Printers
891##  uses 'appsocket' protcol
892##   TCP port 9100
893##    receives job status
894##   UPD port 9101
895##    receives status
896##    send a '\r\n' or 0 length packet to UDP port
897##    responds with status information
898##
899## printcap entry:
900##  lp:cm=Phaser
901##    :lp=/dev/null
902##    :ifhp=model=tek,dev=10.0.0.1%9100
903##    :if=/usr/local/bin/ifhp
904##
905##  OR
906##
907##  lp:cm=Phaser
908##    :lp=/dev/null
909##    :if=/usr/local/bin/ifhp -Tmodel=tek,dev=10.0.0.1%9100
910##
911##  If you insist on banner pages or need powerful accounting
912##  and need an OF filter (NOT recommended with the appsocket protocol),
913##  then add (respectively to the above examples):
914##
915##    :of=/usr/local/bin/ifhp
916##  OR
917##    :of=/usr/local/bin/ifhp -Tmodel=tek,dev=10.0.0.1%9100
918## 
919
920[ tek* phaser* ]
921appsocket
922pjl@
923pcl@
924ps
925sync@
926ps_pagecount_code=%!
927 false 0 startjob pop
928 (%%[ pagecount: )print statusdict /pagecount get exec (                )cvs
929  print
930 ( ]%% )= flush
931ps_inupper=
932 product (Phaser 2) anchorsearch
933 { pop pop 2 dict begin
934        /InputAttributes 1 dict begin /Priority [0] def currentdict
935 end def }
936 {  (Phaser 440) anchorsearch
937        { pop pop 3 dict begin
938                /MediaType (Upper Tray) def
939                /MediaColor null def }
940        { pop 4 dict begin
941                /MediaPosition 0 def
942                /MediaType null def
943                /ManualFeed false def } ifelse
944 } ifelse
945 /TraySwitch false def
946 currentdict end setpagedevice
Note: See TracBrowser for help on using the repository browser.