Star TSP100  (TSP143) - Thermal Printer, passing CUT signal and setting font...

nilsarne82
nilsarne82 used Ask the Experts™
on
Language: VB.NET

I have just bought a TSP100 (TSP143) thermal printer from Star Micronics and I can't seem to figure out how to CUT and set font.

 
The code overview from Star Micronics is located at http://www.starmicronics.com/support/Mannualfolder/linemode_cm_en.pdf 

The code for CUT is according to Star: ESC d

Tried Chr(27) & Chr(100) with no luck...

Testing using the RawPrinterHelper found at - http://support.microsoft.com/?id=322090

When I open the configuration program for the printer and print a test page everything works fine... and I was able to do a hexdump to the attached file.

Opening the cash drawer by sending the Chr(7) DOES work.
020120416-163338.prn
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014

Commented:
>Tried Chr(27) & Chr(100) with no luck...

Did you try

Chr(27) & " " & Chr(100)

Author

Commented:
that didn't work either unfortunately...

nothing happens...
Most Valuable Expert 2012
Top Expert 2014

Commented:
And did you try sending chr(27) first and then chr(100)?
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Author

Commented:
RawPrinterHelper.SendStringToPrinter(PRINTER, Chr(27) & Chr(100))
RawPrinterHelper.SendStringToPrinter(PRINTER, Chr(27) & " " & Chr(100))
RawPrinterHelper.SendStringToPrinter(PRINTER, Chr(27))
RawPrinterHelper.SendStringToPrinter(PRINTER, Chr(100))

None of the above seems to work...

Author

Commented:
Star Support informs that

“\x1b\x64\x33” should work.

However

SendStringToPrinter (“\x1b\x64\x33”)    

does not seem to have any effect.
Most Valuable Expert 2012
Top Expert 2014
Commented:
Have you asked them in the context of .NET what to send to printer?

Author

Commented:
I've changed to C# now, trying if there are any differences...
Yes, they know I'm in .NET.
Star-support: ( should work according to them)
"\x1b\x64\x33"

Open in new window

However when passing this I only get alot of paper beeing fed to the printer...
string buffer = "\x1b\x64\x33";
RawPrinterHelper.SendStringToPrinter("Star TSP100 Cutter (TSP143)", buffer);

Open in new window

Program.cs
Most Valuable Expert 2012
Top Expert 2014
Commented:
Ask them to give you a working sample. Ask them if these are hex values.

Author

Commented:
After doing an uninstall of all Star drivers, remove all software from them and re-install seemed to do the trick...

Now it works
Most Valuable Expert 2012
Top Expert 2014

Commented:
Cool. So config issue not code issue.  Sending "\x1b\x64\x33" works?
Actually this was the correct code to perform cut in TSP100ECO:

\x1b\x64\x02

Open in new window

Author

Commented:
Turned out to be due to drivers/software on machine.
after a reinstall it did work in C#

Give CodeCruiser points since he helped out

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial