Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Help with print filters
@ 1998-12-09  5:00 gabriel_ronin
  1998-12-10  5:00 ` Walker Haddock`
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: gabriel_ronin @ 1998-12-09  5:00 UTC (permalink / raw)


Does anyone know where I can find an example print filter that is not
compiled?  I am trying to locate one that describes how I would set options
for printing compressed and changing the cpi.  Or, if this is not handled by
the print filter can someone inform as to what file or options control print
characterists.

TIA,

Shawn Russell

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with print filters
  1998-12-09  5:00 Help with print filters gabriel_ronin
  1998-12-10  5:00 ` Walker Haddock`
@ 1998-12-10  5:00 ` Juergen Schroeder
  1998-12-10  5:00 ` Ernest LaBonte
  2 siblings, 0 replies; 6+ messages in thread
From: Juergen Schroeder @ 1998-12-10  5:00 UTC (permalink / raw)


gabriel_ronin@my-dejanews.com wrote:
: Does anyone know where I can find an example print filter that is not

This is an example for HP printers:

#!/bin/sh
# Filter for HP-DJ/LJ with 66 lines per page
#     Margin + condensed + LF -> CRLF
#
#\\033\E        # reset
#\\033\&l0O     # portrait = 0, 1 : landscape
#\\033\&l6D     # 6 lines per inch 
#\\033\&l70P    # formlen = 70 lines
#\\033\&l3E     # TOF = 2 lines                       
#\\033\&l66F    # max lines = 66 
#\\033\&a0E     # Left start = 0  ?
#\\033\&k2G     # LF -> CR+LF
#\\033\(s12H    # 12 char per inch   
#\\033\&a16L    # left margin in char
#\\033\&l1S     # 0=einseitig, 1=Hoch- 2=Quer-Duplex
#\\033\(0N      # unix charset
#\\033\%-12345X # ps, eps end 

echo \\033\E\\033\&l0O\\033\&l6D\\033\&l70P\\033\&l2E\\033\&l66F
echo \\033\&k2G\\033\(s12H\\033\&a12L\\033\&l0S\\033\(0N
cat -
echo \\033%-12345X 

------
Use this as if. Remember inputfilters were ignored on remote printers.

Juergen



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with print filters
  1998-12-09  5:00 Help with print filters gabriel_ronin
@ 1998-12-10  5:00 ` Walker Haddock`
  1998-12-10  5:00 ` Juergen Schroeder
  1998-12-10  5:00 ` Ernest LaBonte
  2 siblings, 0 replies; 6+ messages in thread
From: Walker Haddock` @ 1998-12-10  5:00 UTC (permalink / raw)


ftp://ftp.digital.com/pub/sysadm/psf.README

gabriel_ronin@my-dejanews.com wrote:
> 
> Does anyone know where I can find an example print filter that is not
> compiled?  I am trying to locate one that describes how I would set options
> for printing compressed and changing the cpi.  Or, if this is not handled by
> the print filter can someone inform as to what file or options control print
> characterists.
> 
> TIA,
> 
> Shawn Russell
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

-- 

********   DataCrest, Inc. -- Technically Superior 
**********************
Walker Haddock                       http://www.datacrest.com
DataCrest, Inc.                    e-mail:  wh@datacrest.com
272 Snow Drive, Ste. 103            phone:  1-888-941-3282,
1-205-941-3282
Birmingham, AL 35209                  fax:  1-205-941-1843
**************************************************************************



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with print filters
  1998-12-09  5:00 Help with print filters gabriel_ronin
  1998-12-10  5:00 ` Walker Haddock`
  1998-12-10  5:00 ` Juergen Schroeder
@ 1998-12-10  5:00 ` Ernest LaBonte
  1998-12-10  5:00   ` Juergen Schroeder
  2 siblings, 1 reply; 6+ messages in thread
From: Ernest LaBonte @ 1998-12-10  5:00 UTC (permalink / raw)


gabriel_ronin@my-dejanews.com wrote:

> Does anyone know where I can find an example print filter that is not
> compiled?  I am trying to locate one that describes how I would set options
> for printing compressed and changing the cpi.  Or, if this is not handled by
> the print filter can someone inform as to what file or options control print
> characterists.
>
> TIA,
>
> Shawn Russell
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

To provide a printing solution it really helps to know the OS Version,
printer type, connection method, and an idea what you are trying to
accomplish.

The commands to set font size and character pitch are not the same for
all printers. Up front there is PostScript and non-PostScript printer
languages. HP, Epson, Canon non-PostScript languages are different.
You really need to provide the make and model of the printer otherwise
you will get answers based on assumptions.

The commands to set up a printer is provided by the print filter.
However as Juergen Schroeder noted print filters are not used in a
remote print environment. Tcp/ip socket printing has been available
since V4.0a which most printer network cards support.  Most likely you
will be able to change a remote printing environment to tcp/ip and use
print filters. If you are using a serial/parallel connection this
paragraph is provided as an fyi.

Using print filters.  Most printer configurations use an output and
input filter. The output filter handles the banner page. For now use
an existing filter. The input filter handles printing features such as
font, pitch, duplex, tray selection and all that other fun stuff.

You can create a filter from scratch using shell scripts or C code. In
V4.0d a new filter was provided called pcfof.  It uses a Printer
Control File. This is a text file containing the printer commands to
setup the printer and select features. These files reside in
/usr/lbin/pcf.  It might be easier to edit a text file than creating a
filter from scratch. Again without detailed info this may not apply.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with print filters
  1998-12-10  5:00 ` Ernest LaBonte
@ 1998-12-10  5:00   ` Juergen Schroeder
  1998-12-10  5:00     ` Ernest LaBonte
  0 siblings, 1 reply; 6+ messages in thread
From: Juergen Schroeder @ 1998-12-10  5:00 UTC (permalink / raw)


Ernest LaBonte <labonte!@!zk3.dec.com> wrote:
: gabriel_ronin@my-dejanews.com wrote:

:> Does anyone know where I can find an example print filter that is not
[..]

: However as Juergen Schroeder noted print filters are not used in a
: remote print environment. Tcp/ip socket printing has been available

Sorry  Ernest,  I  sayed  that  input  filters  were  ignored  by remote
printers. But one can use filters also for  remote  printers,  the  only
trick  is  to set in the printcap the print device to /dev/null (a local
printer ;-) and forwards the output of  the  local  queue  to  a  remote
(second) printer queue. Thats the filter:

#!/bin/sh
(
echo \\033\E\\033\&l0O\\033\&l6D\\033\&l70P\\033\&l2E\\033\&l66F
echo \\033\&k2G\\033\(s12H\\033\&a12L\\033\&l0S\\033\(0N
cat -
echo \\033%-12345X
) | lpr -P remote_printer


BTW  The  question  has  been a uncompiled script as filter, if one uses
a2ps or the apsfilter packages everything is possible (also on dunix).

Juergen



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with print filters
  1998-12-10  5:00   ` Juergen Schroeder
@ 1998-12-10  5:00     ` Ernest LaBonte
  0 siblings, 0 replies; 6+ messages in thread
From: Ernest LaBonte @ 1998-12-10  5:00 UTC (permalink / raw)


>Juergen Schroeder wrote:
>
>Sorry  Ernest,  I  sayed  that  input  filters  were  ignored  by remote
>printers. But one can use filters also for  remote  printers,  the  only
>trick  is  to set in the printcap the print device to /dev/null (a local
>printer ;-)

Remote printers ignore the lpr/print options stuffed in the control file
that is passed to the printer.

Chaining queues is one way to implement file preprocessing for remote
printing however the banner page will always display the owner as root
or daemon. I forgot which one gets printed.  If you don't use banner pages
this may be an acceptable solution.

Another method is to use a script that calls a print filter to preformat
the file then submits it to the queue. The banner page will display the
correct owner.

Ernest





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-12-10  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-09  5:00 Help with print filters gabriel_ronin
1998-12-10  5:00 ` Walker Haddock`
1998-12-10  5:00 ` Juergen Schroeder
1998-12-10  5:00 ` Ernest LaBonte
1998-12-10  5:00   ` Juergen Schroeder
1998-12-10  5:00     ` Ernest LaBonte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox