From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3ce6d2ee6a23e262 X-Google-Attributes: gidfee84,public From: Ernest LaBonte Subject: Re: Docs for pcfof printer filter? Date: 1998/05/07 Message-ID: <6isbta$s1u$1@lead.zk3.dec.com> X-Deja-AN: 351096594 References: <6iqbou$lh8$1@nnrp1.dejanews.com> Content-Type: multipart/mixed; boundary="------------9764D6FB66C455CEBA574FA2" Organization: UBPG Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 This is a multi-part message in MIME format. --------------9764D6FB66C455CEBA574FA2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit mdonovan@sunyrockland.edu wrote: > In looking for a way to work around the lack of CR/LF conversion when > printing to tcp/ip printers, I noticed /usr/lbin/psfof was used by many > of the new printers at the end of /etc/lprsetup.dat. There's a directory > /usr/lbin/psf filled with config files for the psfof filter, and it looks > like this is a very flexible print filter, and it could easily solve my > problems, but it's not documented anywhere I could find! Somebody throw > me a URL or something, please! (I'll summarize....) > > -----== Posted via Deja News, The Leader in Internet Discussion ==----- > http://www.dejanews.com/ Now offering spam-free web-based newsreading ------------- This should help. Regards, Ernest ------------- --------------9764D6FB66C455CEBA574FA2 Content-Type: text/plain; charset=us-ascii; name="t.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="t.txt" ! @(#)$RCSfile: template.pcf,v $ $Revision: 1.1.2.3 $ $Date: 1997/05/06 12:57:23 $ ! ! 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. ! ! Digital does not support user created PCF files. ! ! PCF files are utilized by the /usr/lbin/pcfof print filter. The PCF files ! enable the pcfof filter to work with many types of printers. Creating a PCF ! file requires familiarity with the printer's programming language. ! ! Special characters used in PCF files are: ! ! - Indicates a comment. ! \xxx - Specify a character by octal value. eg: \033 represents the ! character escape. The value must be three digits. ! \\ - Enter a single backslash character. ! / - A slash as the first character in a field definition ! indicates a file specification. ! ! Entries are in the format fieldname:fieldvalue, where fieldname is a ! specific printing property as listed in this template and fieldvalue is a ! value expressed as a number, a character, a string or a filename. ! For example: ! ! reset: specifies the character or string of characters that will be ! sent to the printer. For example, if the printer's reset value is the ! escape character followed by 'E', this would be specified as `reset:\033E'. ! The fieldvalue is comprised of all the characters between the colon ! character and the end of the line. The fieldvalue must not contain the null ! character octal code \000. ! ! Types of fieldvalues are: ! Multiple characters starting after the colon to the ! end of the line. ! Directory path and filename starting from /. ! Specify a string or file specification. Not both. ! A string value must not start with a /. ! An unsigned integer value. ! Any single character except \000. ! The character Y for yes or N for no. ! ! For properties that are listed as "printer dependent", refer to the ! printer manufacturer's document for presence of the feature and value ! necessary to use it. ! ! Preliminary testing can be performed without the use of a printer. Place a ! copy of the pcfof filter, PCF file, and a test file in the same directory. ! Example command to test a new.pcf file: ! ! cat test_file | pcfof -ntest +L +C./new.pcf > a.out !- ! format version:003 ! PCF file format revision level. Do not change. ! ! Field is required. ! filter type: ! Specifies the printer mode and filter for input data. Values are: ! ! PPL to process text files containing DEC ANSI control sequences. ! PCL to process text files containing HP PCL control sequences. ! ASCII to process plain text files (no control sequences). ! XF to pass the file unprocessed (no formatting at all). ! In XF passthru mode printer setup is still performed. ! ! Value is printer dependent. ! Field is required. ! auto passthru: ! Specifies if the filter should detect pre-formatted files. When the ! value is Y and the file contains a printer reset, and accounting is ! not specified, the file will be sent to the printer unprocessed. ! ! Default value: N ! Field is optional. ! locale: ! Specifies the I18N locale. ! ! Field is optional. ! reset: ! Specifies the command to reset the printer into a known state. ! ! Value for DEC ANSI: \033[!p ! Value for PCL: \033E ! ! Value is printer dependent. ! Field is optional. ! reset delay: ! Specifies the time to wait, in seconds, before continuing to print. ! ! Default value: 0 ! Field is optional. ! init seq: ! Specifies additional printer characteristics such as: line truncation, ! font type, horizontal character pitch, vertical line pitch. ! ! Value is printer dependent. ! Field is optional. ! init delay: ! Specifies the time to wait, in seconds, before continuing to print. ! ! Default value: 0 ! Field is optional. ! term seq: ! Specifies the printer characteristics to set after the file has ! completed printing. Minimally this field contains the same value ! as `reset:'. ! ! Value is printer dependent. ! Field is optional. ! term delay: ! Specifies the time to wait, in seconds, before continuing to print. ! ! Default value: 0 ! Field is optional. ! auto reset: ! Specifies if the filter should reset the default page orientation ! and trays before printing the `term seq:' command. ! ! Default value: N ! Field is optional. ! font file prefix: ! Specifies the string or file to send before printing the font file. ! ! Field is optional. ! font file suffix: ! Specifies the string or file to send after printing the font file. ! ! Field is optional. ! font file: ! Specifies the font string or font file to print. ! ! Field is optional. ! font file lines: ! Specifies the number of lines `font file:' printed. ! ! Default value: 0 ! Field is optional. ! prefix page1: ! Specifies the string or file to print prior to printing page 1. ! Eg: Place the company logo on the first page of a document. ! ! Value is printer dependent. ! Field is optional. ! prefix page1 lines: ! Specifies the number of lines `prefix page1:' printed. ! ! Default value: 0 ! Field is optional. ! prefix pagen: ! Specifies the string or file to print prior to printing each page ! starting with page 2. ! ! Value is printer dependent. ! Field is optional. ! prefix pagen lines: ! Specifies the number of lines `prefix pagen:' printed. ! ! Default value: 0 ! Field is optional. ! suffix page1: ! Specifies the string or file to print on the bottom of page 1. ! Eg: Print for `Company Name Internal use Only' on the footer of page 1. ! ! Value is printer dependent. ! Field is optional. ! suffix page1 at line: ! Specifies the line number to start printing `suffix page1:' ! string or file. ! Note: Subtract the greater of `suffix page1 at line:' or `suffix ! page2 at line:' from portrait lines:' and `landscape lines:' ! to ensure there is enough room on the page to print the data. ! ! Field is required when `suffix page1:' is defined. ! suffix pagen: ! Specifies the string or file to print on the bottom of each page ! starting with page2. ! ! Field is optional. ! suffix pagen at line: ! Specifies the line number to start printing `suffix pagen:' ! string or file. ! Note: Subtract the greater of `suffix page1 at line:' or `suffix ! page2 at line:' from portrait lines:' and `landscape lines:' ! to ensure there is enough room on the page to print the data. ! ! Field is required when `suffix pagen:' is defined. ! character map file: ! Specifies the string or file that contains information on converting ! a single character to an alternate character or character string. ! The file format requires only one assignment per line. For example: ! ! ! Convert all [ characters to {. ! [:{ ! ! Convert all 2 characters to the string `two'. ! 2:two ! ! Convert all @ characters to the string `test' ! \100:t\145st ! ! The colon character `:' must be the second character in the ! assignment. Note that \100 is treated as one character. ! A comment line is an exclamation point followed by a space. ! ! Field is optional. ! orientation: ! Specifies the default page orientation. The available options are ! portrait or landscape. ! ! Field is optional. ! portrait: ! Specifies the command to set the printer in portrait orientation. ! Portrait is when the page height is greater than the page width. ! ! Value is printer dependent. ! Field is optional. ! portrait lines: ! Specifies the maximum number of lines that can be printed on a page ! in portrait orientation. ! ! Default value: 66 ! Field is optional. ! portrait columns: ! Specifies the maximum width in characters that can be printed on a ! page in portrait orientation. A value of 0 indicates no page width ! restrictions. A value of 0 will only work when pw is set to 0 in the ! /etc/printcap file. ! ! Default value: 80 ! Field is optional. ! landscape: ! Specifies the command to set the printer in landscape orientation. ! Landscape is when the page height is less than the page width. ! ! Value is printer dependent. ! Field is optional. ! landscape lines: ! Specifies the maximum number of lines that can be printed on a page in ! landscape orientation. ! ! Field is required when `landscape:' is defined. ! landscape columns: ! Specifies the maximum width in characters that can be printed on a ! page in landscape orientation. A value of 0 indicates no page width ! restrictions. A value of 0 will only work when pw is set to 0 in the ! /etc/printcap file. ! ! Default value: 132 ! Field is optional. ! landscape threshold: ! Specifies the width, in characters, the filter should change the page ! orientation from portrait to landscape. If the value is 0 no automatic ! switching is performed. ! ! Default value: 81 ! Field is optional. ! wrap line: ! Specifies if a line exceeding the portrait or landscape column value ! should be continued on the next line. A value of N will cause the ! line to be truncated. ! ! Default value: N ! Field is optional. ! wrap line mark: ! Specifies the string to print when the current line has been continued ! on the next line. The printed result must print only one character. ! This character will be used to indicate the current line exceeds the ! page width and the remaining text has been continued on the next line. ! ! Value is printer dependent. ! Field is optional. ! newline: ! Specifies the command to set the printing position to column 0 and ! advance 1 line. Suggested value: \015\012 ! ! Field is required. ! return: ! Specifies the command to set the printing position to column 0. ! Suggested value: \015 ! ! Field is required. ! newpage: ! Specifies the command to eject the current page and set the printing ! position to line 1 column 0 on the next page. ! Suggested value: \015\014 ! ! Field is required. ! eojnewpage: ! Specifies the command to conditionally eject the last page in the ! file only when printable data exists. Using this option can cause ! accounting to be off by one page. ! ! Value is printer dependent. ! Field value is optional. ! backspace: ! Specifies the character to move the printing position back 1 character. ! ! Default value: \010 ! Field is optional. ! tab: ! Specifies the character that indicates a tab. ! ! Default value. \011 ! Field is optional. ! tab width: ! Specifies the number of characters between tab positions. ! ! Default value 8. ! Field is optional. ! tab expansion: ! Specifies if the tab character should be replaced with spaces to ! advance to the next stop. ! ! Default value: N ! Field is optional. ! indent: ! Specifies number of spaces to indent each line in the user's file. ! Does not apply to strings or files specified in this file. ! ! Default value: 0 ! Field is optional. ! banner utility: ! trailer utility: ! Specifies the program to create a banner or trailer page. The programs ! are called with the following parameters: ! -xh Print header page ! -xt Print trailer page ! -n User name ! -h Host name ! -N Job name ! -j Job number in the queue ! -C Job class name ! -s Spooling directory ! -w Page width ! -l Page length ! The name of the utility must end in _ps if the utility creates ! postscript banner pages. ! ! Program is printer dependent. ! Field is optional. ! banner tray: ! Specifies the tray name to select for printing the banner page. ! The available tray names are defined below via `input tray :'. ! Should only be used when `input tray default:' has been specified. ! ! Field is optional. ! trailer tray: ! Specifies the tray name to select for printing the trailer page. ! The available tray names are defined below via `input tray :'. ! ! Field is optional. ! input tray default: ! Specifies the tray name to select for printing the file. The command ! `lpr -I' can override the default selection. The available tray names ! are specified below via `input tray :'. ! ! Field is optional. ! input tray : ! Specifies the name of a tray and the command to select it. For example, ! `input tray upper:\033&l1H' creates the input tray name `upper' for ! use by `banner tray:', `trailer tray:', `input tray default:' and the ! `lpr -I' command. A maximum of 25 input tray names can be defined. ! ! Value is printer dependent. ! Field is optional. ! output tray default: ! Specifies the tray name to select to place the printed pages. The ! available tray names are defined below via `output tray :'. ! ! Field is optional. ! output tray : ! Specifies the name of a tray and the command to select it. ! A maximum of 25 output tray names can be defined. ! ! Value is printer dependent. ! Field is optional. ! sides: ! Specifies the number of sides to print on each sheet. ! Set to 1 for single sided (simplex) printing or 2 for two sided ! (duplex) printing. ! ! Default value: 1 ! Value is printer dependent. ! Field is optional. ! simplex: ! Specifies the command to select single sided printing. ! ! Value is printer dependent. ! Field is optional. ! duplex: ! Specifies the command to select two sided printing. ! ! Value is printer dependent. ! Field is optional. ! define : ! Specifies the name of an option and the command to select it. For ! example, `define economode:\033(s1Q' creates the option `economode'. ! The option is invoked by using `lpr -O'. Example: lpr -Oeconomode ! A maximum of 25 options can be defined. ! ! Value is printer dependent. ! Field is optional. ! ps enable: ! Specifies the command that will switch a multi-language printer into ! PostScript mode. A command must be specified to activate the following ! ps definitions. ! ! Suggested value for autosensing printers: %!\012 ! Suggested value for HP PJL printers: ! \033%-12345X@PJL ENTER LANGUAGE=POSTSCRIPT\012 ! ! Value is printer dependent. ! Field is optional. ! ps enable delay: ! Specifies the time to wait, in seconds, before continuing to print. ! ! Default value: 0 ! Field is optional. ! ps disable: ! Specifies the command to reset the printer. ! ! Suggested value for autosensing printers:\004 ! Suggested value for HP PJL printers: \004\033%-12345X ! ! Value is printer dependent. ! Field is required when `ps enable:' is defined. ! ps disable delay: ! Specifies the time to wait, in seconds, before continuing to print. ! ! Default value:0 ! Field is optional. ! ps prolog: ! Specifies the file to print after the `ps enable:' command. ! ! Field is optional. ! ps portrait: ! Specifies the command to set the printer in portrait orientation. ! ! Field is optional. ! ps landscape: ! Specifies the command to set the printer in landscape orientation. ! ! Field is optional. ! ps input tray prolog: ! Specifies the file to print prior to issuing the input tray ! selection commands. ! ! Field is optional. ! ps input tray : ! Specifies the name of a tray and the command to select it. ! For example: ! `ps input tray lcit:\040statusdict begin 2 setpapertray end\012' ! ! A maximum of 25 input tray names can be defined. ! ! Value is printer dependent. ! Field is optional. ! ps output tray prolog: ! Specifies the file to print prior to issuing the output tray ! selection commands. ! ! Field is optional. ! ps output tray : ! Specifies the name of a tray and the command to select it. ! A maximum of 25 output tray names can be defined. ! ! Value is printer dependent. ! Field is optional. ! ps simplex: ! Specifies the string or file to print to select single sided printing. ! ! Value is printer dependent. ! Field is optional. ! ps duplex: ! Specifies the string or file to print to select two sided printing. ! ! Value is printer dependent. ! Field is optional. ! ps define : ! Specifies the name of an option and the command to select it. ! For example, ! ps define times:\040/Times-Roman findfont 12 scalefont setfont\012 ! ! Value is printer dependent. ! Field is optional. --------------9764D6FB66C455CEBA574FA2--