Re: [U2] LPTR / SETPTR / print from a specific tray
And in postscript : - /DeferredMediaSelection true /MediaPosition 0 setpagedevice Substitute the tray number for 0 . Warning: I've seen the MediaPosition to physical tray mapping vary between individual printers- -- mats Burwell, Edward wrote: Hey Paul, Do you (or anyone else) know how to tell a LaserJet to draw paper from a specific tray? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] LPTR / SETPTR / print from a specific tray
Thanks!!! -Original Message- From: Bruce Nichol [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 7:11 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] LPTR / SETPTR / print from a specific tray Goo'day, At 18:22 20/09/05 -0400, you wrote: Hey Paul, Do you (or anyone else) know how to tell a LaserJet to draw paper from a specific tray? We've been using: 0040: LOWER.TRAY = ESC:'l5H' 0041: UPPER.TRAY = ESC:'l1H' 0042: * (that's a lower-case L in there) HTH, in some way. -Original Message- From: Paul Trebbien [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 5:34 PM To: 'u2-users@listserver.u2ug.org' Subject: RE: [U2] LPTR / SETPTR / landscape orientation example Hi Andy, Looks like several posts, did you resolve this? I saw a couple of suggestions in the emails, here's my 2 cents for a program that will set the setting for an HP Laserjet. Note, we have a printer definitions files where you enter the 'hex' codes for the escape sequences to setup the printer and a hex escape sequence to return the printer to the default settings. This is very nice as the user logs on he has a default printer, he can change the printer (from a menu), or a process can be defined to use only the specified printer. Anyway, when user prints the 'software' know which printer is to be used and sends the 'setup' escape sequence and when the print job is complete the 'software' sends the 'reset' escape sequence to the printer. Here is an example program for this and at the end a list of hex commands for a few HP Laserjet and Epson LQ printers - these are old lists and hopefully contain the correct codes. ** PROGRAM : SETUP.HP.LASERJET ** PURPOSE : Send Escape Codes to HP LaserJet ** INPUT ANS ** GOT.CODE=0 BEGIN CASE CASE ANS=L ; CODE=1B266C314F ; GOT.CODE=1 ;* Set Landscape mode CASE ANS=P ; CODE=1B266C304F ; GOT.CODE=1 ;* Set Portrait mode CASE ANS=R ; CODE=1B45 ; GOT.CODE=1 ;* Reset to Default CASE 1 END CASE IF GOT.CODE THEN PRINT ICONV(CODE,'MX'): END * END HP LASERJET HEX COMMAND: DESCRIPTION: 1B45Reset 1B266C314F Landscape 1B266C304F Portrait 1B283855 HP Roman8 1B28733070 Fixed Spacing 31302E30306810.00 Characters per Inch 31322E3076 12.0 Point Size 3073Upright Style 3062Normal Stroke Weight 3354Courier Typeface 1B266C3644 6 Lines per Inch 1B266C3145 1 line Top Margin 1B266C34394649 lines Text Length 1B266C36344664 lines Text Length EPSON LQ and compatible printers HEX COMMAND: DESCRIPTION: Here is a breakdown of what each of these codes mean: 1B40 RESET/INITIALIZE PRINTER 1B50 SELECT PICA PRINT (10 CPI) 1B0F SELECT COMPRESSED PRINT (17 CPI) 1B7830 == SELECT DRAFT FONT 1B7831 == SELECT NLQ (NEAR-LETTER-QUALITY) FONT 1B4315 == SET 21 LINES/PAGE (WHERE 15 HEX = 21 DEC) 1B4316 == SET 22 LINES/PAGE (WHERE 16 HEX = 22 DEC) 1B4321 == SET 33 LINES/PAGE (WHERE 21 HEX = 33 DEC) 1B432A == SET 42 LINES/PAGE (WHERE 2A HEX = 42 DEC) 1B4333 == SET 51 LINES/PAGE (WHERE 33 HEX = 51 DEC) 1B433C == SET 60 LINES/PAGE (WHERE 3C HEX = 60 DEC) 1B4342 == SET 66 LINES/PAGE (WHERE 42 HEX = 66 DEC) 1B4F DISABLE SKIP OVER PERFORATION MODE 0D == CARRIAGE RETURN (FLUSH BUFFER, PROCESS COMMAND) An example of a program to set an HP Laserjet printer to Landscape and then to Reset printer back: Paul Trebbien Kore Technologies, Senior Support Tech. Solutions that work. People who care. V 858.678.0030 F 858.300.2600 W koretech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andy Pflueger Sent: Monday, September 19, 2005 5:26 AM To: U2 User Group Mailing List Subject: [U2] LPTR / SETPTR / landscape orientation example Hi gang, I'm in the process of tweaking one of our reports which use a LIST ... LPTR command line to spool the output to the default printer. However, the results are too wide for portrait orientation and was wanting to find a way to set the orientation with SETPTR prior to the execution of the LIST statement. I tried to use the following statement but that doesn't seem to change the default orientation of the printer: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG More code pasted below: 095: * 096: *-- SELECTION 097: * 098: PRINT @(0,21):@(-4):Sort/Select in progress... 099: START.DATE=OCONV(START.DATE,'D2/') 100: END.DATE=OCONV(END.DATE,'D2/') 101: INIT.CMD='SELECT JOB.MATL WITH' 102: IF START.PERIOD # END.PERIOD THEN 103: INIT.CMD := ' CONO_WPER GE ':CONO:START.PERIOD:' AND WITH CONO_WPER LE ':CONO:END.PERIOD:'' 104: END ELSE 105: INIT.CMD := ' CONO_WPER EQ ':CONO:START.PERIOD:'' 106: END 107: UDTEXECUTE INIT.CMD CAPTURING ASPMSG 108: * 109: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG 110: CMD = 'LIST JOB.MATL
Re: [U2] LPTR / SETPTR / print from a specific tray
Goo'day, At 18:22 20/09/05 -0400, you wrote: Hey Paul, Do you (or anyone else) know how to tell a LaserJet to draw paper from a specific tray? We've been using: 0040: LOWER.TRAY = ESC:'l5H' 0041: UPPER.TRAY = ESC:'l1H' 0042: * (that's a lower-case L in there) HTH, in some way. -Original Message- From: Paul Trebbien [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 5:34 PM To: 'u2-users@listserver.u2ug.org' Subject: RE: [U2] LPTR / SETPTR / landscape orientation example Hi Andy, Looks like several posts, did you resolve this? I saw a couple of suggestions in the emails, here's my 2 cents for a program that will set the setting for an HP Laserjet. Note, we have a printer definitions files where you enter the 'hex' codes for the escape sequences to setup the printer and a hex escape sequence to return the printer to the default settings. This is very nice as the user logs on he has a default printer, he can change the printer (from a menu), or a process can be defined to use only the specified printer. Anyway, when user prints the 'software' know which printer is to be used and sends the 'setup' escape sequence and when the print job is complete the 'software' sends the 'reset' escape sequence to the printer. Here is an example program for this and at the end a list of hex commands for a few HP Laserjet and Epson LQ printers - these are old lists and hopefully contain the correct codes. ** PROGRAM : SETUP.HP.LASERJET ** PURPOSE : Send Escape Codes to HP LaserJet ** INPUT ANS ** GOT.CODE=0 BEGIN CASE CASE ANS=L ; CODE=1B266C314F ; GOT.CODE=1 ;* Set Landscape mode CASE ANS=P ; CODE=1B266C304F ; GOT.CODE=1 ;* Set Portrait mode CASE ANS=R ; CODE=1B45 ; GOT.CODE=1 ;* Reset to Default CASE 1 END CASE IF GOT.CODE THEN PRINT ICONV(CODE,'MX'): END * END HP LASERJET HEX COMMAND: DESCRIPTION: 1B45Reset 1B266C314F Landscape 1B266C304F Portrait 1B283855 HP Roman8 1B28733070 Fixed Spacing 31302E30306810.00 Characters per Inch 31322E3076 12.0 Point Size 3073Upright Style 3062Normal Stroke Weight 3354Courier Typeface 1B266C3644 6 Lines per Inch 1B266C3145 1 line Top Margin 1B266C34394649 lines Text Length 1B266C36344664 lines Text Length EPSON LQ and compatible printers HEX COMMAND: DESCRIPTION: Here is a breakdown of what each of these codes mean: 1B40 RESET/INITIALIZE PRINTER 1B50 SELECT PICA PRINT (10 CPI) 1B0F SELECT COMPRESSED PRINT (17 CPI) 1B7830 == SELECT DRAFT FONT 1B7831 == SELECT NLQ (NEAR-LETTER-QUALITY) FONT 1B4315 == SET 21 LINES/PAGE (WHERE 15 HEX = 21 DEC) 1B4316 == SET 22 LINES/PAGE (WHERE 16 HEX = 22 DEC) 1B4321 == SET 33 LINES/PAGE (WHERE 21 HEX = 33 DEC) 1B432A == SET 42 LINES/PAGE (WHERE 2A HEX = 42 DEC) 1B4333 == SET 51 LINES/PAGE (WHERE 33 HEX = 51 DEC) 1B433C == SET 60 LINES/PAGE (WHERE 3C HEX = 60 DEC) 1B4342 == SET 66 LINES/PAGE (WHERE 42 HEX = 66 DEC) 1B4F DISABLE SKIP OVER PERFORATION MODE 0D == CARRIAGE RETURN (FLUSH BUFFER, PROCESS COMMAND) An example of a program to set an HP Laserjet printer to Landscape and then to Reset printer back: Paul Trebbien Kore Technologies, Senior Support Tech. Solutions that work. People who care. V 858.678.0030 F 858.300.2600 W koretech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andy Pflueger Sent: Monday, September 19, 2005 5:26 AM To: U2 User Group Mailing List Subject: [U2] LPTR / SETPTR / landscape orientation example Hi gang, I'm in the process of tweaking one of our reports which use a LIST ... LPTR command line to spool the output to the default printer. However, the results are too wide for portrait orientation and was wanting to find a way to set the orientation with SETPTR prior to the execution of the LIST statement. I tried to use the following statement but that doesn't seem to change the default orientation of the printer: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG More code pasted below: 095: * 096: *-- SELECTION 097: * 098: PRINT @(0,21):@(-4):Sort/Select in progress... 099: START.DATE=OCONV(START.DATE,'D2/') 100: END.DATE=OCONV(END.DATE,'D2/') 101: INIT.CMD='SELECT JOB.MATL WITH' 102: IF START.PERIOD # END.PERIOD THEN 103: INIT.CMD := ' CONO_WPER GE ':CONO:START.PERIOD:' AND WITH CONO_WPER LE ':CONO:END.PERIOD:'' 104: END ELSE 105: INIT.CMD := ' CONO_WPER EQ ':CONO:START.PERIOD:'' 106: END 107: UDTEXECUTE INIT.CMD CAPTURING ASPMSG 108: * 109: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG 110: CMD = 'LIST JOB.MATL BY CTR BY JOB BY PERIOD BY DATE BY TRANS WITH' 111: IF DEPT.IN http://DEPT.IN # 'ALL' THEN 112: CMD:=' JMT.DEPT = ':DEPT.IN:'' 113: IF DEPT.IN http://DEPT.IN = '23' THEN 114: CMD:=' AND WITH GJOB.CHECK # ' 115: CMD:=' AND WITH P.QTY
RE: [U2] LPTR / SETPTR / print from a specific tray
all this info is in the google : http://www.artwork.com/support/windows/escape.htm -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Burwell, Edward Sent: Tuesday, September 20, 2005 06:22 PM To: u2-users@listserver.u2ug.org Subject: [U2] LPTR / SETPTR / print from a specific tray Hey Paul, Do you (or anyone else) know how to tell a LaserJet to draw paper from a specific tray? -Original Message- From: Paul Trebbien [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 5:34 PM To: 'u2-users@listserver.u2ug.org' Subject: RE: [U2] LPTR / SETPTR / landscape orientation example Hi Andy, Looks like several posts, did you resolve this? I saw a couple of suggestions in the emails, here's my 2 cents for a program that will set the setting for an HP Laserjet. Note, we have a printer definitions files where you enter the 'hex' codes for the escape sequences to setup the printer and a hex escape sequence to return the printer to the default settings. This is very nice as the user logs on he has a default printer, he can change the printer (from a menu), or a process can be defined to use only the specified printer. Anyway, when user prints the 'software' know which printer is to be used and sends the 'setup' escape sequence and when the print job is complete the 'software' sends the 'reset' escape sequence to the printer. Here is an example program for this and at the end a list of hex commands for a few HP Laserjet and Epson LQ printers - these are old lists and hopefully contain the correct codes. ** PROGRAM : SETUP.HP.LASERJET ** PURPOSE : Send Escape Codes to HP LaserJet ** INPUT ANS ** GOT.CODE=0 BEGIN CASE CASE ANS=L ; CODE=1B266C314F ; GOT.CODE=1 ;* Set Landscape mode CASE ANS=P ; CODE=1B266C304F ; GOT.CODE=1 ;* Set Portrait mode CASE ANS=R ; CODE=1B45 ; GOT.CODE=1 ;* Reset to Default CASE 1 END CASE IF GOT.CODE THEN PRINT ICONV(CODE,'MX'): END * END HP LASERJET HEX COMMAND: DESCRIPTION: 1B45Reset 1B266C314F Landscape 1B266C304F Portrait 1B283855 HP Roman8 1B28733070 Fixed Spacing 31302E30306810.00 Characters per Inch 31322E3076 12.0 Point Size 3073Upright Style 3062Normal Stroke Weight 3354Courier Typeface 1B266C3644 6 Lines per Inch 1B266C3145 1 line Top Margin 1B266C34394649 lines Text Length 1B266C36344664 lines Text Length EPSON LQ and compatible printers HEX COMMAND: DESCRIPTION: Here is a breakdown of what each of these codes mean: 1B40 RESET/INITIALIZE PRINTER 1B50 SELECT PICA PRINT (10 CPI) 1B0F SELECT COMPRESSED PRINT (17 CPI) 1B7830 == SELECT DRAFT FONT 1B7831 == SELECT NLQ (NEAR-LETTER-QUALITY) FONT 1B4315 == SET 21 LINES/PAGE (WHERE 15 HEX = 21 DEC) 1B4316 == SET 22 LINES/PAGE (WHERE 16 HEX = 22 DEC) 1B4321 == SET 33 LINES/PAGE (WHERE 21 HEX = 33 DEC) 1B432A == SET 42 LINES/PAGE (WHERE 2A HEX = 42 DEC) 1B4333 == SET 51 LINES/PAGE (WHERE 33 HEX = 51 DEC) 1B433C == SET 60 LINES/PAGE (WHERE 3C HEX = 60 DEC) 1B4342 == SET 66 LINES/PAGE (WHERE 42 HEX = 66 DEC) 1B4F DISABLE SKIP OVER PERFORATION MODE 0D == CARRIAGE RETURN (FLUSH BUFFER, PROCESS COMMAND) An example of a program to set an HP Laserjet printer to Landscape and then to Reset printer back: Paul Trebbien Kore Technologies, Senior Support Tech. Solutions that work. People who care. V 858.678.0030 F 858.300.2600 W koretech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andy Pflueger Sent: Monday, September 19, 2005 5:26 AM To: U2 User Group Mailing List Subject: [U2] LPTR / SETPTR / landscape orientation example Hi gang, I'm in the process of tweaking one of our reports which use a LIST ... LPTR command line to spool the output to the default printer. However, the results are too wide for portrait orientation and was wanting to find a way to set the orientation with SETPTR prior to the execution of the LIST statement. I tried to use the following statement but that doesn't seem to change the default orientation of the printer: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG More code pasted below: 095: * 096: *-- SELECTION 097: * 098: PRINT @(0,21):@(-4):Sort/Select in progress... 099: START.DATE=OCONV(START.DATE,'D2/') 100: END.DATE=OCONV(END.DATE,'D2/') 101: INIT.CMD='SELECT JOB.MATL WITH' 102: IF START.PERIOD # END.PERIOD THEN 103: INIT.CMD := ' CONO_WPER GE ':CONO:START.PERIOD:' AND WITH CONO_WPER LE ':CONO:END.PERIOD:'' 104: END ELSE 105: INIT.CMD := ' CONO_WPER EQ ':CONO:START.PERIOD:'' 106: END 107: UDTEXECUTE INIT.CMD CAPTURING ASPMSG 108: * 109: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG 110: CMD = 'LIST JOB.MATL BY CTR BY JOB BY PERIOD BY DATE BY TRANS WITH' 111: IF DEPT.IN http://DEPT.IN # 'ALL' THEN 112: CMD:='
RE: [U2] LPTR / SETPTR / print from a specific tray
One of the programs we use has this line of code in it: MAN.PAPER.TRAY = CHAR(27):l2G; * SELECT THE MANUAL SOURCE TRAY It then just does a PRINT MAN.PAPER.TRAY to switch before printing a preprinted form. One of the online references I use, and like, has the command you need. Just be sure to change the 1 to which ever tray you want. Here it is: http://printers.necsam.com/public/printers/pclcodes/pcl5hp.htm Hope that helps. BobW -Original Message- From: [EMAIL PROTECTED] [mailto:owner-u2- [EMAIL PROTECTED] On Behalf Of Burwell, Edward Sent: Tuesday, September 20, 2005 3:22 PM To: 'u2-users@listserver.u2ug.org' Subject: [U2] LPTR / SETPTR / print from a specific tray Hey Paul, Do you (or anyone else) know how to tell a LaserJet to draw paper from a specific tray? -Original Message- From: Paul Trebbien [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 5:34 PM To: 'u2-users@listserver.u2ug.org' Subject: RE: [U2] LPTR / SETPTR / landscape orientation example Hi Andy, Looks like several posts, did you resolve this? I saw a couple of suggestions in the emails, here's my 2 cents for a program that will set the setting for an HP Laserjet. Note, we have a printer definitions files where you enter the 'hex' codes for the escape sequences to setup the printer and a hex escape sequence to return the printer to the default settings. This is very nice as the user logs on he has a default printer, he can change the printer (from a menu), or a process can be defined to use only the specified printer. Anyway, when user prints the 'software' know which printer is to be used and sends the 'setup' escape sequence and when the print job is complete the 'software' sends the 'reset' escape sequence to the printer. Here is an example program for this and at the end a list of hex commands for a few HP Laserjet and Epson LQ printers - these are old lists and hopefully contain the correct codes. ** PROGRAM : SETUP.HP.LASERJET ** PURPOSE : Send Escape Codes to HP LaserJet ** INPUT ANS ** GOT.CODE=0 BEGIN CASE CASE ANS=L ; CODE=1B266C314F ; GOT.CODE=1 ;* Set Landscape mode CASE ANS=P ; CODE=1B266C304F ; GOT.CODE=1 ;* Set Portrait mode CASE ANS=R ; CODE=1B45 ; GOT.CODE=1 ;* Reset to Default CASE 1 END CASE IF GOT.CODE THEN PRINT ICONV(CODE,'MX'): END * END HP LASERJET HEX COMMAND: DESCRIPTION: 1B45 Reset 1B266C314FLandscape 1B266C304FPortrait 1B283855 HP Roman8 1B28733070Fixed Spacing 31302E303068 10.00 Characters per Inch 31322E307612.0 Point Size 3073 Upright Style 3062 Normal Stroke Weight 3354 Courier Typeface 1B266C36446 Lines per Inch 1B266C31451 line Top Margin 1B266C343946 49 lines Text Length 1B266C363446 64 lines Text Length EPSON LQ and compatible printers HEX COMMAND: DESCRIPTION: Here is a breakdown of what each of these codes mean: 1B40 RESET/INITIALIZE PRINTER 1B50 SELECT PICA PRINT (10 CPI) 1B0F SELECT COMPRESSED PRINT (17 CPI) 1B7830 == SELECT DRAFT FONT 1B7831 == SELECT NLQ (NEAR-LETTER-QUALITY) FONT 1B4315 == SET 21 LINES/PAGE (WHERE 15 HEX = 21 DEC) 1B4316 == SET 22 LINES/PAGE (WHERE 16 HEX = 22 DEC) 1B4321 == SET 33 LINES/PAGE (WHERE 21 HEX = 33 DEC) 1B432A == SET 42 LINES/PAGE (WHERE 2A HEX = 42 DEC) 1B4333 == SET 51 LINES/PAGE (WHERE 33 HEX = 51 DEC) 1B433C == SET 60 LINES/PAGE (WHERE 3C HEX = 60 DEC) 1B4342 == SET 66 LINES/PAGE (WHERE 42 HEX = 66 DEC) 1B4F DISABLE SKIP OVER PERFORATION MODE 0D == CARRIAGE RETURN (FLUSH BUFFER, PROCESS COMMAND) An example of a program to set an HP Laserjet printer to Landscape and then to Reset printer back: Paul Trebbien Kore Technologies, Senior Support Tech. Solutions that work. People who care. V 858.678.0030 F 858.300.2600 W koretech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andy Pflueger Sent: Monday, September 19, 2005 5:26 AM To: U2 User Group Mailing List Subject: [U2] LPTR / SETPTR / landscape orientation example Hi gang, I'm in the process of tweaking one of our reports which use a LIST ... LPTR command line to spool the output to the default printer. However, the results are too wide for portrait orientation and was wanting to find a way to set the orientation with SETPTR prior to the execution of the LIST statement. I tried to use the following statement but that doesn't seem to change the default orientation of the printer: UDTEXECUTE 'SETPTR 0,1,,Orientation=LANDSCAPE' CAPTURING ASPMSG More code pasted below: 095: * 096: *-- SELECTION 097: * 098: PRINT @(0,21):@(-4):Sort/Select in progress... 099: START.DATE=OCONV(START.DATE,'D2/') 100: END.DATE=OCONV(END.DATE,'D2/') 101: INIT.CMD='SELECT