I copied the gs_epsonc printer setup in the ifhp.conf file and created an
ibmpro entry that looks like:

[ ibmpro ]
tc=pcl_gs
gs_device=ibmpro
gs_options=

So all I changed there was the gs_device to ibmpro, which gs lists as a
supported output device. When I print a text file using lpr, the PCL
initialization string is printed then the rest of the text file. An IBM
proprinter does not know about PCL at all so it will just print out the PCL
codes like they are part of the text file.

What we want is to send the initialization string at the start of the print
job:

\022\033A\014\033CB\033F\033H\033W0\033T\033-0\033O\033R

and to be able to set the pitch, right margin and pagelength with -Z
options. I have the commands that need to be sent to set these parameters.

What I tried doing was adding the following commands to the ifhp.conf file:

## START IBM config - ajf

ibm_user_opts=[
    pitch5 pitch6 pitch9 pitch10 pitch12 pitch17
  ]

ibm_pitch5=\022\033W1\c
ibm_pitch6=\022\033:\033W1\c
ibm_pitch9=\022\017\033W1\c
ibm_pitch10=\022\033W0\c
ibm_pitch12=\022\033:\033W0\c
ibm_pitch17=\022\017\033W0\c

ibm_init=\022\033A\014\033CB\033F\033H\033W0\033T\033-0\033O\033R

## END IBM config - ajf

[ ibmpro ]
status@
sync@
pagecount@
pjl@
pcl
ps@
text@
ibm
file_output_match = [
  *text*  ibm
]

I've only tried the pitch commands for now - I'll add the others when I get
this working.

At the moment when the ifhp filter is piped a file it's returning nothing on
the output. If I change the file_output_match to *text* raw, then it just
prints out the raw input file as expected. I'm running the ifhp filter from
the command line as:

/usr/local/libexec/filters/ifhp -T model=ibmpro < /tmp/testfile

>From here I don't know where to go. Can ifhp handle adding additional
command sets, or should I be writing a shell script as a print filter and
using that instead of ifhp?

Hope that all made sense! :)

Thanks,

Adam.


----- Original Message -----
From: "Brandon S. Allbery KF8NH" <[EMAIL PROTECTED]>
To: "Adam Fox" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 11:48 AM
Subject: RE: LPRng: Print filter for IBM proprinter emulation


> > That would only be for printing ghostscript files, right? We will only
be
> > printing simple plain text files, but we want to be able to pass options
> on
> > the lpr command line such as pitch=10 or pagelength=30. Will gs handle
> this?
>
> ifhp handles those, and invokes gs to handle PostScript content (and
likely
> other content, by converting to PostScript and then rendering that with
gs).
> Again, any of the existing "recipes" for dot matrix printers can be used
as
> a template for this.
>
> (I don't have an installed ifhp in front of me to look at, sorry....)
>
> --
> brandon s allbery [openafs/solaris/japh/freebsd] [EMAIL PROTECTED]
> system administrator [linux/heimdal/too many hats] [EMAIL PROTECTED]
> electrical and computer engineering                              KF8NH
> carnegie mellon university  [better check the oblivious first -ke6sls]


Attention:
The information contained in this message and or attachments is intended only for the 
person or entity to which it is addressed and may contain confidential and/or 
privileged material.  Any review, retransmission, dissemination or other use of, or 
taking of any action in reliance upon, this information by persons or entities other 
than the intended recipient is prohibited. If you received this in error, please 
contact the sender and delete the material from any system and destroy any copies.

Any views expressed in this message are those of the individual sender and may not 
necessarily reflect the views of The Gribbles Group.

Thank You.

Whilst every effort has been made to ensure that this e-mail message and any 
attachments are free from viruses, you should scan this message and any attachments.
Under no circumstances do we accept liability for any loss or damage which may result 
from your receipt of this message or any attachment.

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to