tags:

views:

157

answers:

2

I have a Star TSP100 printer and I'm having few problems with it really.

My problem is that I'm not as familiar with programming as I should be - but I'm learning!

The programmers reference for the Star printer says that if I send a ESC d to the printer - that will activate the built-in cutter - which I would like to do very much.

My problem is that I have no idea how to send an escape code like that from within Perl - if it's even possible.

I really appreciate any advice on this one.

A: 

http://www.rhinocerus.net/forum/lang-clipper-visual-objects/600098-lowlevel-printing-esc-codes-sending-printer-vista.html#post2414259

It's written in Clipper but fairly easy to understand since it uses the standard Windows Printing API, callable in 99% of Win32 programming languages.b

Hernán
+5  A: 

Escape is just a character; it can be written (among other things) as "\e" or "\033". So assuming you have a handle open to the printer device, all you need is to print $fh "\ed".

hobbs