From: Ernest LaBonte <labonte!@!zk3.dec.com>
Subject: Don't use lpd remote when you can use tcp/ip
Date: 1998/05/11 [thread overview]
Message-ID: <6j71e5$tk3$1@lead.zk3.dec.com> (raw)
In-Reply-To: 3551AB26.754E@nospam.com
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
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.
[-- Attachment #2: asdf.txt --]
[-- Type: text/plain, Size: 2323 bytes --]
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:
<ctrl-d>%!
or
<esc>%-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 <ctrl-d>%! . The filter
will assume files starting with <esc>%-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:
prev parent reply other threads:[~1998-05-11 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-07 4:00 Postscript Printing Problems (probably a pretty easy one!) Dean J.
1998-05-07 4:00 ` Emmanuel Choquet
1998-05-07 4:00 ` Patrick Leung
1998-05-07 4:00 ` Emmanuel Choquet
1998-05-11 4:00 ` Ernest LaBonte [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox