From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,36994d53e4ffaed3 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fee84,36994d53e4ffaed3 X-Google-Attributes: gidfee84,public From: Ernest LaBonte Subject: Don't use lpd remote when you can use tcp/ip Date: 1998/05/11 Message-ID: <6j71e5$tk3$1@lead.zk3.dec.com>#1/1 X-Deja-AN: 352257940 References: <3551AB26.754E@nospam.com> Content-Type: multipart/mixed; boundary="------------FC7C50AFC5EC590A230C358C" Organization: UBPG Mime-Version: 1.0 Newsgroups: comp.unix.questions,comp.unix.osf.osf1 This is a multi-part message in MIME format. --------------FC7C50AFC5EC590A230C358C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dean J. wrote: > I recently obtained nenscript to print code we're developing (ascii to > postscript - to allow landscaped mode printing etc.). I've successfully > compiled/installed the thing. > > My problem is that the printers (as they are currently configured) on > the network don't seem to support Postscript characters. Instead, I just > seem to be getting a postscript file printed out in its literal ascii > representation (e.g. %%Title ..., %%Creator ... plenty of Postscript > instructions, but nothing formatted). > > I originally configured the printers using the System > Administrator/Printer Configuration tool which is part of Digital Unix > 4.0D's system admin toolset. > > Is there someway I can rectify the problem, i.e. get my printers to > support or interpret the Postscript files correctly? > > Many thanks, Dean J. --------------FC7C50AFC5EC590A230C358C Content-Type: text/plain; charset=us-ascii; name="asdf.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asdf.txt" You didn't post the the printer type so I will assume it is an HP style network printer with PostScript capabilities. Print Queue Setup DON'T USE LPD REMOTE printing when you can use tcp/ip printing. HP JetDirect, and similar, cards provided tcp/ip socket capabilities. This feature was added in V4.0a and is a better way to go than lpd remote printing. Tcp/ip printing can use print filters for file processing. More on this later. About PostScript files Many programs expect PostScript files to start with %!. It is common for PostScript files created by PC's to add stuff before %! such as: %! or %-12345....%! When files don't start with %! the software attempts to convert the file to PostScript. I expect this is where you are having problems. Converting text files to PostScript. The file /usr/lbin/ps_level1of is a print filter that will convert text to PostScript and pass PostScript files. The program can recognize PostScript files starting with %! or %! . The filter will assume files starting with %-12345....%! is a text file and attempt to convert it. This filter can print text files in landscape. If I recall `lpr -w132' or `lpr -Olandscape' will provide landscape printing. If the printer has a duplex ability try lpr -K2. Setting up a tcp/ip socket printer. This is documented in either the release notes or in the system admin guide. Here are the key points. - You must be able to ping the printer. - You need to add the net card socket address in /etc/services. For HP printers the address is usually 9100. So add something like `pr_9100 9100/tcp' to the end of the /etc/services file. Restart inetd eg: > ps ax |grep inetd 537 ?? I 0:00.53 /usr/sbin/inetd 21029 ttyp2 S + 0:00.01 grep inetd > kill -HUP 537 - Using lprsetup or printconfig create a print queue for a ps_level1 printer. In lprsetup for Set device pathname 'lp' [] ?" specify @printer.ip.address/pr_9100 - If everything went well you can print to the printer. Sample Printcap Entry lp|lp0:\ :if=/usr/lbin/ps_level1of:\ :lf=/usr/adm/lp0err:\ :mx#0:\ :lp=@printer.dec.com/pr_9100:\ :of=/usr/lbin/ps_level1of:\ :pl#66:\ :pw#80:\ :rw:\ :sd=/usr/spool/print/hp:\ :xf=/usr/lbin/xf: --------------FC7C50AFC5EC590A230C358C--