From: LaBonte <labonte@zk3.dec.com>
Subject: Re: Printer filter
Date: 2000/01/05 [thread overview]
Message-ID: <38734E03.A62AEE2B@zk3.dec.com> (raw)
In-Reply-To: A2CD16FD9F46D3118C970004ACD60E400147C110@mail.anadolu.edu.tr
You can use the pcfof print filter to perform character substitution for
text printers.
Start by creating a printcap entry that uses the pcfof print filter.
The best setup depends on version of the operating system and the printer
make and model. Some suggestions are:
hp680c PCL printers.
generic_text Text printers.
generic_ansi ANSI printers.
After the printer setup is working edit the printcap entry change the
IF and OF settings. If the printcap entry has:
:if=/usr/lbin/pcfof +Cgeneric_text.pcf:\
:of=/usr/lbin/pcfof +Cgeneric_text.pcf:\
Change it to:
:if=/usr/lbin/pcfof +Cmy_generic_text.pcf:\
:of=/usr/lbin/pcfof +Cmy_generic_text.pcf:\
Copy /usr/lbin/pcf/generic_text.pcf to /usr/lbin/pcf/my_generic_text.pcf
and set the file protections to 644. All system provided pcf files are
replaced during system upgrades.
To create a character map file cd to /usr/lbin/pcf. Use your favorite text
editor and create test.map and insert the following lines:
':"
`:"
$:C\010=
The text must be left justified and the : character must be the second
character in the line. What does this file do?
':" Replace all ' characters with ".
`:" Replace all ` characters with ".
$:C\010= Replace all $ with C<backspace>=
to create a Euro symbol.
Save your changes and set the file protection to 644. Now edit
my_generic_text.pcf and look for the line:
character map file:
And replace it with:
character map file:/usr/lbin/pcf/test.map
For more information on PCF files look at the file template.pcf provided
in V4.0f and later.
The filter performs a blind substitution assuming the replacement character
occupies the same space as the original character. If this isn't the case
page formatting will be affected, for example character and column (tabs)
will not be vertically aligned.
--------------------
Mustafa Demirbilek wrote:
> I have an application that produces aoutput for a dot matrix printer. Some
> characters have to be replaced before they are sent to the printer. I tried
> to add lines to /etc/printcap (if, of, etc) but could not succeed.
>
> Does anybody have experience with filters?
>
> Any advise is wellcome
prev parent reply other threads:[~2000-01-05 5:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-04 5:00 Printer filter Mustafa Demirbilek
2000-01-04 5:00 ` Jesper Frank Nemholt
2000-01-05 5:00 ` LaBonte
2000-01-10 5:00 ` Jesper Frank Nemholt
2000-01-11 5:00 ` LaBonte
2000-01-05 5:00 ` Sue Gleeson
2000-01-10 5:00 ` Forskningsing. vid Maskinsektionens DataCentral
2000-01-05 5:00 ` 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