Operating System - Tru64 Unix
1753959 Members
7548 Online
108811 Solutions
New Discussion юеВ

Creating filter for printing.

 
del moore
New Member

Creating filter for printing.

I am running OSF1 version 5.1 and want to set up a print queue pointing to a network printer. I need to append a postscript snippet to the beginning of the print job and cannot get the "if" or "of" to work like it did for Sun OS 4.x. On the Sun system I created a double spool, one local so the "if" would be read which respooled to a queue that is directed to a network printer. OSF1 appears to allow network printing and if/of filtering in the same queue. I see that pcof has a +Cpcf-filename that allows printer command modifications but all examples show PCL and not postscript. Any ideas will be greatly appreciated.
4 REPLIES 4
Ralf Puchner
Honored Contributor

Re: Creating filter for printing.

This is a sample: (please use lprsetup)

lp|lp0:\
:if=/usr/lbin/pcfof +Cln15.pcf:\
:lf=/usr/adm/lp0err:\
:mx#0:\
:lp=@printer.zk3.dec.com/socket_3001:\
:of=/usr/lbin/pcfof +Cln15.pcf:\
:pl#66:\
:pw#80:\
:sd=/usr/spool/lp0:\
:xf=/usr/lbin/xf:

pcfof is a default print filter and +C specifies the different printer related configurations. see /usr/lbin/pcf for additional printers.

If you want to add additional postscript releated information specify it with the lpr command or create a second queue adding a trailer to the file and forward the result to this queue via lpr.

Btw. the pcf files in /usr/lbin/pcf can be modified (plain text), there are leading/trailing and init sequences which can be modified.
Help() { FirstReadManual(urgently); Go_to_it;; }
Joris Denayer
Respected Contributor

Re: Creating filter for printing.

Changing pcf files, don't forget the comments. (ending with <<<<<<<<<<)

# head /usr/lbin/pcf/ln15.pcf

! @(#)$RCSfile: ln15.pcf,v $ $Revision: 1.1.2.2 $ $Date: 1998/07/17 18:37:34 $
!
! NOTE: Do not modify this file! <<<<<<<<<<<<<<<<<<
! This file will be replaced when the operating system is updated.
!+
! ModelName: Digital Laser Printer LN15, Letter Paper
!
! Features:
!
! Switch to landscape for widths > 80 columns.


# head /usr/lbin/pcf/template.pcf
! @(#)$RCSfile: template.pcf,v $ $Revision: 1.1.2.4 $ $Date: 1998/09/14 19:35:52 $
!
! NOTE: Do not modify this file! <<<<<<<<<<<<
! This file will be replaced when the operating system is updated.
!+
! This template documents the Printer Control File (PCF) format and is
! intended for use as a reference guide.
!
! Compaq does not support user created PCF files. <<<<<<<<<<<<<<<<<<<<<<
!


To err is human, but to really faul things up requires a computer
Ralf Puchner
Honored Contributor

Re: Creating filter for printing.

Joris,

it is true, editing a pcf file is not supported (but manual intervention outside of the setup tools are all unsupported), but the real problem is to modify it without renaming the file. During an update or patch installion it may be overwritten.

Help() { FirstReadManual(urgently); Go_to_it;; }
del moore
New Member

Re: Creating filter for printing.

Ralf helped me by setting up the socket on the lp= line which was somthing I did not ask but was looking for the solution. I knew about the pcf files and tried to create a new one putting my postscript information in the init seq: thinking that would be sent with each job. It is not appended to the file sent. What triggers the init seq to be added and how many characters can be in that line? Can the "filter type" be set to PS for postscript?