Kevin,
The codes are as follows: (These are for HP printers other printers may
require different seq)
*27,"E" - is and Escape E or reset
*27,"&k2G" - is a command to convert Linux line feeds to cariage return
followed by a line feed
This is all done in the Terminal file so you can have one terminal type
setup for each printer and can be used by multiple printers.
Hope this helps.
Mark
Kevin Toppenberg wrote:
Mark,
I like your solution. It is certainly more succinct
than mine was.
From your code, it appears that IO is set to equal $I
before PRE-OPEN EXECUTE code it set. I didn't realize
that the variable ION was set to the device name.
We have a HP laserjet 5. I haven't tried sending it
escape sequences (as you seem to be doing.) When I
tried to choose subtype that was 12point, it didn't
print right. What are you doing with those escape
sequences?
Kevin
--- MPA <[EMAIL PROTECTED]> wrote:
I have been using the following settings in the
device and terminal
types. I have printed to multiple printers and sent
multiple
labels/prescriptions to an single printer over a
very short period of
time. It has not failed me yet, Kevin is correct the
key is in the
PRE-OPEN EXECUTE, I just set IO equal to $I with a
piece in the middle
consisting of $J(job) and the second peice of
$H(time) this give the
TEMP file its own unique name.
You do not have th have the printer name in the
temporary file just
SOMETHING.TMP, you need the format SOMETHING.TMP
because the PRE-OPEN
EXECUTE in the DEVICE does a $P looking for a ".".
You also need to
have the DEVICE Name equal to the Linux name for the
printer, this is
the ION variable so "lpr" know what printer to use.
I do suggest leaving
the TEMP file name the same as the device name so if
you have a failure
you at least know the device name that failed. It is
the CLOSE EXECUTE
in the TERMINAL TYPE that triggers the "lpr" to
print.
Let me know if this works.
Mark
Select TERMINAL TYPE NAME: P-HPMES
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes// (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// BOTH
Computed Fields and
Record Number
(IEN)
NUMBER: 198 NAME:
P-HPMES
RIGHT MARGIN: 80 FORM FEED: #
PAGE LENGTH: 64 BACK SPACE:
$C(8)
OPEN EXECUTE: W *27,"E",*27,"&k2G"
CLOSE EXECUTE: W *27,"E" U IO K IO(1,IO) C IO
ZSYSTEM "lpr -r -l -P
"_ION_" "_IO
Attached below are the DEVICE's for reference.
OUTPUT FROM WHAT FILE: TERMINAL TYPE// DEVICE
Select DEVICE NAME: HP2200 BASEMENT
/home/pharmacy/t/HP2200.TMP
ANOTHER ONE: HP4050 OFFICE
/home/pharmacy/t/HP4050.TMP
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes// (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// BOTH
Computed Fields and
Record Number
(IEN)
NUMBER: 42 NAME: HP2200
$I: /home/epharmacy/t/HP2200.TMP ASK DEVICE:
NO
ASK PARAMETERS: NO QUEUING:
ALLOWED
LOCATION OF TERMINAL: BASEMENT ASK HOST
FILE: NO
PRE-OPEN EXECUTE: S
IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPMES TYPE: HOST
FILE SERVER
NUMBER: 40 NAME: HP4050
$I: /home/pharmacy/t/HP4050.TMP ASK DEVICE: NO
ASK PARAMETERS: NO LOCATION OF
TERMINAL: OFFICE
ASK HOST FILE: NO
PRE-OPEN EXECUTE: S
IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPMES TYPE: HOST
FILE SERVER
Ruben Safir wrote:
On Fri, 2005-06-10 at 14:58, Ismet Kursunoglu, MD
wrote:
Thanks, I can now continue to work on this - lots
of power under the
hood with endless possibilities with the CUPS
server now accepting the
print jobs.
I am really also very impressed with Samba 3.0x
and their Cups
integration. Amazing work.
Maybe, but I can't tell you how bad SAMBA is as a
protocol. All the
SMB/CIF networking is a disaster. It floods your
network, and is slow.
Ruben
Kevin Toppenberg wrote:
Ismet, as I look more closely at what you have, I
see
that you are already fairly close to what I have
done.
The differences that I see are that you have:
PRINT SERVER NAME OR ADDRESS: 192.168.0.105
REMOTE PRINTER NAME: HL1240
In my system, I don't use this. Instead, the
printer
output should be written to the file specified in
IO
(which is set in the PRE-OPEN EXECUTE code), and
then
the function in POST-CLOSE EXECUTE (DO
FINISH^ZZZPRNTR("HL1240") ) should pass a signal
to
the linux lpr command to print the file.
So VistA doesn't need to know the ip address of
the
printer. It is shielded from all that. That is
defined at the Linux OS level.
Kevin
--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
I have written my process to a web page on the
wikki.
Here is the link. See if that gets you going.
http://openforum.worldvista.org/~forum/index.php?title=Setting_up_a_Linux_Printer
Kevin
--- "Ismet Kursunoglu, MD"
<[EMAIL PROTECTED]>
wrote:
Kevin mentioned in one of his very helpful
notes
to
this list,
"Printing success & description of method"
Kevin Toppenberg Mon, 10 Jan 2005 17:57:07
-0800]
the entries for the device file including the
following:
PRE-OPEN EXECUTE: DO SETJOB^ZZZPRNTR(.IO)
;Note:
=== message truncated ===
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members