Sending tray code to hp
John Sica
john at chrismanncomputer.com
Tue Mar 2 12:33:45 PST 2010
I have done that, but it was slightly different in that case. It wasn't
filepro, but a cobol accounting program not very different than
"RealWorld" called "Truckpro". I thought I could be a little more direct
here.
As it turns out, JP asked me what the interface script was. As I thought
about it and examined the script, I stumbled upon a line in the
HPLaserJet SCO Unix interface script. The line had the code for the
upper bin, appropriately named ubin. The code was Octal, I think, and I
added that echo command (echo "\033&l1H") right before the line in the
script that says "start printing files here".
Well, it works perfectly. Everything that prints using this printer
prints to the upper bin and everything else, prints to the lower bin.
Saved them the space and cost of a new printer.
Thanks for your timely responses, both you and JP covered all the areas
I covered in my thought processes.
John
Richard Kreiss wrote:
> Have you tried putting everything into a script, outside fp, then calling
> the script a menu?
>
> You have a lot of good tools on *nix for reading the menu's script files for
> the report name you are looking for. This should cut down on the time it
> takes to reprogram the menus.
>
> Since I only work in a windows environment and have been out of *nix for
> almost 25 years, my scripting is quite rusty.
>
> Richard
>
>
>> -----Original Message-----
>> From: John Sica [mailto:john at chrismanncomputer.com]
>> Sent: Tuesday, March 02, 2010 2:47 PM
>> To: Richard Kreiss
>> Subject: Re: Sending tray code to hp
>>
>> I think the new programmer, who works for me (my daughter) doesn't know
>> where all the menus are that print to this printer. And I know how
>> complicated it was to find all the processing tables to insert the
>> getenv parameter to change the printer destination in the first place.
>> She did that as well.
>>
>> I just thought that if I could get that code at the front of the print
>> job using maybe the cat - >>"print code in proper format" | netcat -h
>> "ipaddress" -p "portnum" on the filepro command line in printer
>> configuration, it would work.
>>
>> It works when I type it in from the shell, but filepro doesn't like cat
>> filename >>$TRAYCODE | netcat etc,etc,etc.
>>
>> I have been able to put variables in the printer command line, but these
>> kinds of codes are not usual, in that they may have to be in a certain
>> format, I think. Not really sure as to why it prints from the command
>> line, but not from the line in the config file.
>>
>> Thanks,
>>
>> John
>>
>>
>>
>>
>>
>> Richard Kreiss wrote:
>>
>>> John,
>>>
>>> If you are printing from a menu command line, you could add -r
>>>
> printer_name
>
>>> to the command line and then check if @pm = printer_name and if so set
>>>
> the
>
>>> variable.
>>>
>>> Richard
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: John Sica [mailto:john at chrismanncomputer.com]
>>>> Sent: Tuesday, March 02, 2010 11:01 AM
>>>> To: Richard Kreiss
>>>> Subject: Re: Sending tray code to hp
>>>>
>>>> Yes, that's a good idea. In fact, that's how I tested the code in the
>>>> first place. The only problem with that is that the 30 or 40 different
>>>> print jobs that could print to this tray also print to other printers
>>>>
> in
>
>>>> other departments when the customer is in another department at the
>>>>
> time
>
>>>> of invoicing/registration/whatever. I don't think that is as much of a
>>>> problem, cuz there are no other printers (10) that have extra trays,
>>>> only this one. So the code would probably not do any harm being on
>>>>
> the
>
>>>> page. Unless it works so well that they want to get extra trays for
>>>> the other printers. With all the different developers in over the
>>>>
> last
>
>>>> 25 years, I didn't want to have the customer have to tell me what form
>>>> didn't print on the right tray and fix each problem reactively.
>>>>
>>>> I'll be trying a couple of ways to do this in a few hours, and if I
>>>>
> find
>
>>>> a solution, I'll let you know what worked.
>>>>
>>>> Thanks for responding
>>>>
>>>> John
>>>>
>>>>
>>>> Richard Kreiss wrote:
>>>>
>>>>
>>>>>> -----Original Message-----
>>>>>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>>>>>>
>>>>>>
>>>>>>
>>>>> [mailto:filepro-
>>>>>
>>>>>
>>>>>
>>>>>> list-bounces+rkreiss=verizon.net at lists.celestial.com] On Behalf Of
>>>>>>
> John
>
>>>>>>
>>>>> Sica
>>>>>
>>>>>
>>>>>
>>>>>> Sent: Tuesday, March 02, 2010 9:14 AM
>>>>>> To: filepro-list at lists.celestial.com
>>>>>> Subject: Sending tray code to hp
>>>>>>
>>>>>> I need to send a tray selection code to an HP printer for specific
>>>>>>
>>>>>>
>>> users
>>>
>>>
>>>>>> (determined by login account). The printer name is already set in a
>>>>>> variable that filepro gets (GETENV) for PCs in this department,
>>>>>> determined by IP address.
>>>>>>
>>>>>> The login needs to be able to change this printer destination again
>>>>>>
> so
>
>>>>>> that all jobs send the tray 2 code (which is not the default tray)
>>>>>> before the jobs print.
>>>>>>
>>>>>> Every print job sends an overlay to the printer, then prints the job.
>>>>>> Each job is 3 pages, and the overlay gets resent after each page. I
>>>>>> know sending the overlay every page is extra work, but everything
>>>>>>
>>>>>>
>>> prints
>>>
>>>
>>>>>> fast anyway.
>>>>>>
>>>>>> My thought is to create a new printer who's interface program embeds
>>>>>>
>>>>>>
>>> the
>>>
>>>
>>>>>> tray 2 code (^[&l1H) , then have this new printer set in the
>>>>>>
>>>>>>
>>> environment
>>>
>>>
>>>>>> at login.
>>>>>>
>>>>>> I don't know how to embed this code in the interface script, which
>>>>>>
> now
>
>>>>>> all use netcat in the interface script (sco unix 5.05).
>>>>>>
>>>>>> My other thought is to use the new filepro printer name (which is
>>>>>>
> the
>
>>>>>> same name as the unix printer name), to have the tray 3 code
>>>>>>
> initialize
>
>>>>>> it. I'm not sure how to do this either.
>>>>>>
>>>>>> A suggestion either way would be appreciated.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> John
>>>>>>
>>>>>>
>>>>>>
>>>>> Why not place a variable at the top of the page to output the tray
>>>>>
>>>>>
>>> wanted.
>>>
>>>
>>>>> In processing set the variable to the proper tray code based on who
>>>>>
> the
>
>>> use
>>>
>>>
>>>>> is.
>>>>>
>>>>> This avoids have to create a new printer and would allow the print job
>>>>>
>>>>>
>>> to go
>>>
>>>
>>>>> to any printer with multiple trays.
>>>>>
>>>>>
>>>>> Richard Kreiss
>>>>> GCC Consulting
>>>>> rkreiss at gccconsulting.net
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>
>
>
>
>
More information about the Filepro-list
mailing list