Mark, It prints!
Thanks very much. There is more progress as mentioned below.
*************************
I set the device name to the cups printer, in this case 'HL1240' with
proper close execute and it prints. There is a downwards "stair
stepping" in the printed output. Is this related to some terminal setting?
Kevin, I recall in an earlier post you mentioned this problem.
Is this something that can only be done with additional code or should I
just experiment with other terminal settings or designations? I have
not come across any document that directly addresses printing - i.e.
from http://www.va.gov/vdl/
Select DEVICE NAME: HL1240 HOME LAN /home/ibk/t/HL1240.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: HL1240
$I: /home/ibk/t/HL1240.TMP ASK DEVICE: NO
ASK PARAMETERS: NO TASKMAN PRINT A HEADER PAGE: NO
SIGN-ON/SYSTEM DEVICE: NO QUEUING: ALLOWED
LOCATION OF TERMINAL: HOME LAN LOCAL SYNONYM: HL1240
ASK HOST FILE: NO ASK HFS I/O OPERATION: NO
FORM CURRENTLY MOUNTED: Plain paper
MNEMONIC: HL1240
PRE-OPEN EXECUTE: S IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPLASER12 USE TIMEOUT ON OPENS: NO
TYPE: TERMINAL
PRINT SERVER NAME OR ADDRESS: 192.168.0.105
REMOTE PRINTER NAME: HL1240 ASK DEVICE TYPE AT SIGN-ON:
YES, ASK
NUMBER: 95 NAME: P-HPLASER12
SELECTABLE AT SIGN-ON: YES RIGHT MARGIN: 80
FORM FEED: # PAGE LENGTH: 70
BACK SPACE: $C(8)
OPEN EXECUTE: W
*27,"E",*27,"&s0C",*27,"&k10H",*27,"&10o7.64c69p2e67F",*27,"&a
196M"
CLOSE EXECUTE: W *27,"E" U IO K IO(1,IO) C IO ZSYSTEM "lpr -r -l -P
"_ION_" "_IO
DESCRIPTION: HP laser printer in portrait mode (12 cpi)
MPA wrote:
Ismet,
You should not need a POST-CLOSE EXECUTE, the CLOSE EXECUTE in the
TERMINAL TYPE will take care of it.
This field should be: CLOSE EXECUTE: W *27,"E" U IO K IO(1,IO) C IO
ZSYSTEM "lpr -r -l -P "_ION_" "_IO
NOTE the "_IO" on the end this varible is equal to the device name so
the Linux ZSYSTEM call for the lpr command will expand to something like:
lpr -r -l -P /home/ibk/t/HL1240.12345612345.TMP HL1240
You currently have the printer varialbe equal to "PRINTER NAME: HL1240",
the Device name needs to equal the Linux name for the printer. You could
just force the Linux name of the printer here just change the end to
"_ION_" HL1240
Also I have a space after the "-P" I believe some versions of lpr you do
not want a space.
Hope this helps.
Mark
Ismet Kursunoglu, MD wrote:
Thanks very much Mark,
I got this with my first go around ->
Heading (S/C): DEVICE LIST//
DEVICE: test TEST-LINUX-PRINTER HOME LAN [BUSY] ... RETRY? NO//
Then I realized I got the path wrong to the temp file. Now I am
getting this error:
Do you want your output QUEUED? NO// (NO)
lpr: error - unable to print file: client-error-not-found
Do I need to set the "POST-CLOSE EXECUTE:" ?
Here are configurations of the terminal and device. (I am using an older
Brother HL1240 laser printer- which pretty much emulates a basic HP
Laser Jet)
*********
Select TERMINAL TYPE NAME: P-HPLASER12
HP laser printer in portrait mode (12 cpi)
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes// (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// BOTH Computed Fields and
Record Number
(IEN)
NUMBER: 95 NAME: P-HPLASER12
SELECTABLE AT SIGN-ON: YES RIGHT MARGIN: 96
FORM FEED: # PAGE LENGTH: 64
BACK SPACE: $C(8)
OPEN EXECUTE: W
*27,"E",*27,"&s0C",*27,"&k10H",*27,"&10o7.64c69p2e67F",*27,"&a
196M"
CLOSE EXECUTE: W *27,"E" U IO K IO(1,IO) C IO ZSYSTEM "lpr -r -l -P
"_ION_" "_PRINTER NAME: HL1240 ASK DEVICE TYPE AT SIGN-ON:
YES, ASK
IO
DESCRIPTION: HP laser printer in portrait mode (12 cpi)
********
Select DEVICE NAME: HL1240 TEST-LINUX-PRINTER HOME LAN
/home/ibk/t/HL1240.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: TEST-LINUX-PRINTER
$I: /home/ibk/t/HL1240.TMP ASK DEVICE: NO
ASK PARAMETERS: NO SIGN-ON/SYSTEM DEVICE: NO
QUEUING: ALLOWED LOCATION OF TERMINAL: HOME LAN
LOCAL SYNONYM: HL1240 ASK HOST FILE: NO
ASK HFS I/O OPERATION: NO FORM CURRENTLY MOUNTED: Plain
paper
MNEMONIC: HL1240
PRE-OPEN EXECUTE: S IO=$P(IO,".")_"."_$J_$P($H,",",2)_"."_$P(IO,".",2)
SUBTYPE: P-HPLASER12 USE TIMEOUT ON OPENS: NO
TYPE: TERMINAL
PRINT SERVER NAME OR ADDRESS: 192.168.0.105
REMOTE PRINTER NAME: HL1240 ASK DEVICE TYPE AT SIGN-ON:
YES, ASK
*************
I see the print jobs now writing out to the temp file /home/ibk/t
-rw-r--r-- 1 ibk ibk 849 Jun 11 21:34 HL1240.291477692.TMP
-rw-r--r-- 1 ibk ibk 849 Jun 11 21:37 HL1240.291477848.TMP
-rw-r--r-- 1 ibk ibk 849 Jun 11 21:38 HL1240.291477887.TMP
-rw-r--r-- 1 ibk ibk 849 Jun 11 21:39 HL1240.291477958.TMP
-rw-r--r-- 1 ibk ibk 0 Jun 11 21:29 HL1240.TMP
The server log /var/log/cups shows
#tail -f access_log
192.168.0.100 - - [11/Jun/2005:22:03:43 -0700] "POST / HTTP/1.1" 200 137
192.168.0.100 - - [11/Jun/2005:22:03:43 -0700] "POST / HTTP/1.1" 200 137
192.168.0.100 - - [11/Jun/2005:22:03:43 -0700] "POST / HTTP/1.1" 200 77
192.168.0.100 - - [11/Jun/2005:22:03:43 -0700] "POST / HTTP/1.1" 200 124
192.168.0.100 - - [11/Jun/2005:22:03:43 -0700] "POST / HTTP/1.1" 200 124
Corresponding to submitting the print job.
Thanks for any advice. And thanks to all of you on the list and beyond
for your patience, fantastic discussions/observations and hard work.
MPA 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:
Change IO (output file)
What should the output file be? Is that the spool
directory for the client, the URI of the printer or the type of
file
i.e. PDF/PS
I have setup CUPS on one of the LAN servers here
(in
this case running under FreeBSD 4.8) and can print from all the
Linux
workstations as well as from a Windows 2000 Pro box. I think I am
almost
there in printing from within VistA/GT.M/Debian. This
is what I
have
so far: (the printer is a Brother 1240 laser)
OUTPUT FROM WHAT FILE: DEVICE//
Select DEVICE NAME: test-LINUX-PRINTER HOME
LAN
$I:
ANOTHER ONE:
STANDARD CAPTIONED OUTPUT? Yes// (Yes)
Include COMPUTED fields: (N/Y/R/B): NO// - No
record number (IEN), no Computed
Fields
NAME: TEST-LINUX-PRINTER $I: $I:
ASK DEVICE: NO ASK
PARAMETERS: NO
SIGN-ON/SYSTEM DEVICE: YES QUEUING:
ALLOWED
LOCATION OF TERMINAL: HOME LAN LOCAL
SYNONYM: HL1240
ASK HOST FILE: NO ASK HFS
I/O
OPERATION: NO
MNEMONIC: HL1240
POST-CLOSE EXECUTE: DO
FINISH^ZZZPRNTR("HL1240")
PRE-OPEN EXECUTE: DO SETJOB^ZZZPRNTR(.IO)
SUBTYPE: P-HPLASER-P12 USE
TIMEOUT
ON OPENS: NO
TYPE: TERMINAL
PRINT SERVER NAME OR ADDRESS: 192.168.0.105
REMOTE PRINTER NAME: HL1240 ASK
DEVICE
TYPE AT SIGN-ON: YES, ASK
Also should one use the URI/IPP or the IP address
for the printer address?
Thank you.
Ismet
--
Ismet B. Kursunoglu, MD, FCCP
Medical Director
Alaska Clinic, LLC
3750 Country Field Circle, UNIT B
Wasilla, Alaska 99654
[EMAIL PROTECTED]
(907)357-7240
-------------------------------------------------------
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
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around http://mail.yahoo.com
-------------------------------------------------------
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
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
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
-------------------------------------------------------
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
-------------------------------------------------------
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
-------------------------------------------------------
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
--
Ismet B. Kursunoglu, MD, FCCP
Medical Director
Alaska Clinic, LLC
3750 Country Field Circle, UNIT B
Wasilla, Alaska 99654
[EMAIL PROTECTED]
(907)357-7240
-------------------------------------------------------
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