From: John K.Eason on 5 Sep 2006 12:31 In article <1157462400.946445.24830(a)p79g2000cwp.googlegroups.com>, areejan2000(a)yahoo.com (Cmaz) wrote: > this is included in the userguide pdf ,came with driver cd > > EPSON ESC/P2 control codes > Selecting an EPSON ESC/P2 printer in your software allows you > to use advanced fonts and graphics. > General operation: > ESC @, ESC U, ESC EM > > Paper feeding: > FF, LF, ESC 0, ESC 1, ESC 2, ESC 3, ESC +, CR > > Page format: > ESC (C, ESC C, ESC C 0, ESC Q, ESC l, ESC (c, ESC N, ESC O > > Print position motion: > ESC $, ESC \, ESC (V, ESC (v, ESC D, HT, ESC B, VT, ESC J Those are all fully detailed in the link I gave, but none of them are directly for *reverse* line/page feed. The 'Paper feeding' ones you list are for line feed/carriage return and setting line spacing. The 'Page Format' ones set the top and bottom margins and page length. The 'Print position motion' ones set the absolute/relative horizontal print position and vertical print position on the page. You might be able to do something with the 'ESC ( V nn' one as that sets the absolute vertical print position on the page, but I've no way of checking it as I got rid of my last dot matrix printer around 15 years ago! Regards John (john(a)jeasonNoSpam.cix.co.uk) Remove the obvious to reply...
From: Cmaz on 6 Sep 2006 01:18 based on http://www.uktsupport.co.uk/epson/impact/esc2gui.htm but there is no LQ300+ in the list only LQ300 there is command ESC ( V m1 m2 n1 n2 (Set Absolute Vertical Position) ESC ( V m1 m2 n1 n2 is the command for changing the print position vertically (with respect to the Top of Form position) in units where m1, m2, n1 and n2 are variables. The "unit" is usually 1/360 of an inch unless defined otherwise by the "ESC ( U" command. Currently, the values for m1 and m2 MUST be m1=2 and m2=0. how do i define "ESC ( U" and i tried 'LPRINT CHR$(27);"(V";CHR$(2);CHR$(0);CHR$(104);CHR$(1) in vb Printer.Print Chr$(27) & Chr$(40) & Chr$(86) & Chr$(2) & Chr$(0) & Chr$(104) & Chr$(1) John K.Eason wrote: > In article <1157462400.946445.24830(a)p79g2000cwp.googlegroups.com>, > areejan2000(a)yahoo.com (Cmaz) wrote: > > > this is included in the userguide pdf ,came with driver cd > > > > EPSON ESC/P2 control codes > > Selecting an EPSON ESC/P2 printer in your software allows you > > to use advanced fonts and graphics. > > General operation: > > ESC @, ESC U, ESC EM > > > > Paper feeding: > > FF, LF, ESC 0, ESC 1, ESC 2, ESC 3, ESC +, CR > > > > Page format: > > ESC (C, ESC C, ESC C 0, ESC Q, ESC l, ESC (c, ESC N, ESC O > > > > Print position motion: > > ESC $, ESC \, ESC (V, ESC (v, ESC D, HT, ESC B, VT, ESC J > > Those are all fully detailed in the link I gave, but none of them are > directly for *reverse* line/page feed. > > The 'Paper feeding' ones you list are for line feed/carriage return and > setting line spacing. > > The 'Page Format' ones set the top and bottom margins and page length. > > The 'Print position motion' ones set the absolute/relative horizontal > print position and vertical print position on the page. > > You might be able to do something with the 'ESC ( V nn' one as that sets > the absolute vertical print position on the page, but I've no way of > checking it as I got rid of my last dot matrix printer around 15 years > ago! > > Regards > John (john(a)jeasonNoSpam.cix.co.uk) Remove the obvious to reply...
From: Bill Plenge on 6 Sep 2006 02:15 Cmaz wrote: > based on > http://www.uktsupport.co.uk/epson/impact/esc2gui.htm > > but there is no LQ300+ in the list only LQ300 > > > there is command > > ESC ( V m1 m2 n1 n2 (Set Absolute Vertical Position) > > ESC ( V m1 m2 n1 n2 is the command for changing the print position > vertically (with respect to the Top of Form position) in units where > m1, m2, n1 and n2 are variables. The "unit" is usually 1/360 of an > inch unless defined otherwise by the "ESC ( U" command. Currently, the > values for m1 and m2 MUST be m1=2 and m2=0. > > how do i define "ESC ( U" > > and i tried > > 'LPRINT CHR$(27);"(V";CHR$(2);CHR$(0);CHR$(104);CHR$(1) > in vb > Printer.Print Chr$(27) & Chr$(40) & Chr$(86) & Chr$(2) & Chr$(0) & > Chr$(104) & Chr$(1) > > The LPRINT CHR$(27);"(V" portion is correct. As is the structure of Chr$(27) & Chr$(40) & Chr$(86), though CHR$(27) &"(V" is probably easier to follow. Now the problem I see is that are you certain that m1, m2, n1 and n2 are byte variables? m1 and m2 may well be since they must be 2 and 0 respectively, but it's unlikely that n1 and n2 if you consider the default unit is 1/360 of an inch then byte units would only be able to position the cursor in rougly the upper left corner .75 inches from left or top margin. The last Epson docs I had were for the LQ-80 and at the beginning it specified which variable names were bytes and whick where integers. I do remember writing a graphic screen dump in Basic for a TRS-80 ( With a graphics card ) and going through a lot of paper debugging it, but cant' recall if MKI$ worked (MKI$ is "Little Endian") for the integers or I had to convert the number to hex, split it into high and low byte in string format and take the VAL of each to pass to CHR$ to make a Big Endian equivilant. < Insert Obligatory warning about "air code" here > Sub PositionPrinter(n1 as integer, n2 as integer) Dim PPos$ PPos$ = Chr$(27) & "(V" & Chr$(2) & Chr$(0) PPos$ = PPos$ & MakeInt$( n1 ) & MakeInt$( n2 ) LPrint PPos$; End Sub Function MakeInt$( i_NumIn as Integer ) Dim Hx$ Hx$ = Right$("000" & Trim$(Hex$( i_NumIn)),4) ' If this doesn't work try reversing the Left$ and Right$ commands as shown in the commented line MakeInt$ = Chr$( Val ("&H"& Left$( Hx$,2)) & Chr$( Val ("&H"& Right$( Hx$,2)) ' Big Endian ' MakeInt$ = Chr$( Val ("&H"& Right$( Hx$,2)) & Chr$( Val ("&H"& Left$( Hx$,2)) ' Little Endian End Function I hope this helps. Best, Bill
From: Johan Bechthum on 6 Sep 2006 03:42 I have tried it on an old Panasonic KX-P1540 which emulates the Epson LQ-1500. I suppose the Esc-codes are the same for different Epson-LQ's. In QB (DOS) use: ' Executes one-line paper feed of 60/180 inch LPRINT CHR$(27) + "J" + CHR$(60); LPRINT "First line"; ' Executes one-line reverse paper feed of 30/180 inch LPRINT CHR$(27) + "j" + CHR$(30); ' Move the printhead to the left margin LPRINT CHR$(27) + "$" + CHR$(0) + CHR$(0); LPRINT "Second line"; LPRINT : LPRINT In VB5 use: Private Sub Command1_Click() Dim iPrn As Integer iPrn = FreeFile 'Open the print-port directly Open "LPT1:" For Output As #iPrn ' Executes one-line paper feed of 60/180 inch Print #iPrn, Chr$(27) + "J" + Chr$(60); Print #iPrn, "First line"; ' Executes one-line reverse paper feed of 30/180 inch Print #iPrn, Chr$(27) + "j" + Chr$(30); ' Move the printhead to the left margin Print #iPrn, Chr$(27) + "$" + Chr$(0) + Chr$(0); Print #iPrn, "Second line"; Print #iPrn, "" Close #iPrn End Sub It was fun digging in the past :-) Johan. "Cmaz" <areejan2000(a)yahoo.com> schreef in bericht news:1157394674.252928.323460(a)m79g2000cwm.googlegroups.com... > in vb Printer.print will print blank line > > what is the command to set > the printer paper "roll back" a few lines to adjust lines every time > a print job is given ,to avoid it done manually each time) > > > > is there any dos commands like char$( ) specifically for this > for doing the opposit of printer.print > > I tried custom size paper in server properties (size is 6" height and > 8" width) > but its not rolling back. > may be i am not doing it right. > > > or Epson LQ-300 Dotmatrix doesnt support this? > > but i have seen this done on some other printer, but i dont remember > the model. >
From: John K.Eason on 7 Sep 2006 03:59 In article <1157519921.790933.183520(a)p79g2000cwp.googlegroups.com>, areejan2000(a)yahoo.com (Cmaz) wrote: > but there is no LQ300+ in the list only LQ300 I doubt the codes will be any different. The Epson site doesn't list a separate '+' version. > there is command > > ESC ( V m1 m2 n1 n2 (Set Absolute Vertical Position) > > ESC ( V m1 m2 n1 n2 is the command for changing the print position > vertically (with respect to the Top of Form position) in units where > m1, m2, n1 and n2 are variables. The "unit" is usually 1/360 of an inch > unless defined otherwise by the "ESC ( U" command. Currently, the > values for m1 and m2 MUST be m1=2 and m2=0. > > how do i define "ESC ( U" > > and i tried > > 'LPRINT CHR$(27);"(V";CHR$(2);CHR$(0);CHR$(104);CHR$(1) > in vb > Printer.Print Chr$(27) & Chr$(40) & Chr$(86) & Chr$(2) & Chr$(0) & > Chr$(104) & Chr$(1) As I said, it's a very long time since I used a dot matrix printer. So long, in fact that I wasn't even using a PC in those days. - I think the programming I did with one was actually using BBC Basic on a BBC model B! Regards John (john(a)jeasonNoSpam.cix.co.uk) Remove the obvious to reply...
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: What is this error ??? Next: Run-time error '-2147221020 (800401e4) please help |