tubst
asked on
printer control code
Dear Sir:
I have a vb program which print data to dot matrix printer STAR SP 300.
In programmer's menual there is table for control codes used for charactor setting.
How can I trigger 1/6 inches line feed using control codes in vb 5.0.
Example:
Control codes : <ESC> "z" "1"
Hexadecimal codes: 1B 7A 31
Function: set 1/6 inch line feed
In character code table <ESC> is 27,"z" is 122, "1" is 49.
But now how to carry out 'Set 1/6 inch line feed' function using Printer.print ????
I try:
Printer.print chr$(27) +chr$(122)+chr$(49)
print only three characters.
my best regards,
I need answer ASAP.
I have a vb program which print data to dot matrix printer STAR SP 300.
In programmer's menual there is table for control codes used for charactor setting.
How can I trigger 1/6 inches line feed using control codes in vb 5.0.
Example:
Control codes : <ESC> "z" "1"
Hexadecimal codes: 1B 7A 31
Function: set 1/6 inch line feed
In character code table <ESC> is 27,"z" is 122, "1" is 49.
But now how to carry out 'Set 1/6 inch line feed' function using Printer.print ????
I try:
Printer.print chr$(27) +chr$(122)+chr$(49)
print only three characters.
my best regards,
I need answer ASAP.
ASKER
Your answer is rejected.
I have to use control code to enabel a different funtion.
Not only "Set 1/6 inch line feed", but also:
1. initialize printer
2. clear printer buffer
3. tigger auto-cutter driver
...
....
Control code will be printer dependent.
By the way , do you have experience with STAR SP 300 series printer? The biggest problem is that I can not tigger the printer to cut the paper using control code. That is not done by printer driver, although I have set the printer in Auto-cutting model already.
I have to use control code to enabel a different funtion.
Not only "Set 1/6 inch line feed", but also:
1. initialize printer
2. clear printer buffer
3. tigger auto-cutter driver
...
....
Control code will be printer dependent.
By the way , do you have experience with STAR SP 300 series printer? The biggest problem is that I can not tigger the printer to cut the paper using control code. That is not done by printer driver, although I have set the printer in Auto-cutting model already.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Star Micronics
70-D Ethel Road West
Piscataway, NJ 08854
Inside Sales: (800) 782-7636 Ext. 512 or (732) 572-9512 Ext. 512
Sales Fax: (732) 572-5095
FaxBack: (732) 572-4004
Bulletin Board: (732) 572-5010
Technical Support: (732) 572-9512
Technical Support Fax: (732) 572-5995
Technical Support E-mail: Userhelp@Starus.com
Warranty Service: (732) 572-9512 Ext. 538
What driver are you using?
Latest seems to be dated April 99, V3.4. If set to ticket mode it should cut every time it gets a formfeed.
M
70-D Ethel Road West
Piscataway, NJ 08854
Inside Sales: (800) 782-7636 Ext. 512 or (732) 572-9512 Ext. 512
Sales Fax: (732) 572-5095
FaxBack: (732) 572-4004
Bulletin Board: (732) 572-5010
Technical Support: (732) 572-9512
Technical Support Fax: (732) 572-5995
Technical Support E-mail: Userhelp@Starus.com
Warranty Service: (732) 572-9512 Ext. 538
What driver are you using?
Latest seems to be dated April 99, V3.4. If set to ticket mode it should cut every time it gets a formfeed.
M
Hi, I have exatly the same problem. I'm trying to send the cut command to a Star SP300
I posted this on another question:
https://www.experts-exchange.com/questions/21138620/Send-Cut-Command-to-POS-printer.html
I will give 500 points to the one who tells me exactly how to do this. I dont know C++
I just want to send <ESC> "d" "3" (cut command.
I posted this on another question:
https://www.experts-exchange.com/questions/21138620/Send-Cut-Command-to-POS-printer.html
I will give 500 points to the one who tells me exactly how to do this. I dont know C++
I just want to send <ESC> "d" "3" (cut command.
Use the windows drivers for the printer and let it control the printer. IT will work correctly no matter what.
Also, 1/6" line spacing is the *DEFAULT* on almost all printers (as is 10CPI). You shouldn't have to set it no matter what.
Windows isolates your program from the printers internal characteristics. If you use the Printer.CurrentY parameter you can print text at any spacing you want. Windows will handle figuring out how to convert your commands to the commands for any specific printer. Your code will be printer independent.
This is a major departure from DOS.
Printer control parameters include:
Printer.CurrentX/Y
Printer.TextWidth()
Printer.TextHeight()
Printer.Bold
Printer.Underline
Printer.Italic
etc. As you send these commands in your program windows will handle the conversion.
M