Printing on Epson USB ticket printer

Startbeitrag von Freddy am 19.10.2009 16:21

Hi,
I need to print to a USB connected, or parallel with parallel - USB cable, Epson TM-T88III or TM-T88IV ticket printer using a Generic/Text only installed printer.
In the manual there is only a Visual basic example with code like this:

PRINT #1, CHR$(&H1B);"@"; 'Initializes the printer (ESC @)
PRINT #1, CHR$(&H1B);"a";CHR$(1);'Specifies a centered printing position (ESC a)
PRINT #1, CHR$(&H1B);"!";CHR$(0); 'Specifies font A (ESC !)
PRINT #1, "January 14, 2002 15:00";

I don't find a way to translate this to Windev code, because I find only the caract() function for sending decimal escape codes but not for hexadecimal like in the basic example.
Thus sombody know a way how to do this ?

Kind regards,

Freddy

Antworten:

If it's a parallel printer just use sopen,swrite.

For the Hexdecimal problem use VAL or the constants ESC, CR, TAB
ESC@ is the same as val("1B","x")+"@" or charact(27)+"@" or ESC+"@"



&H1B = val("1B","x") or charact(27) or the keyword ESC

von Paulo Oliveira - am 19.10.2009 16:47
Freddy, 'Hexadecimal' is just a numeric system like 'binary' or 'decimal' is. You can convert any Hex number to decimal to binary and back - it's always the same natural numbers.

H1B = 1*161 + 11*160 = 27 decimal

there are good boooks about this number business.

Btw, WinDev has its way to express hexadecimal numbers too
0x1B = 27 (decimal)

On Windows XP*32 and on Windows 7*32 you can trick the OS into thinking that a USB-printer is a parallel LPT-port. Not so on Windows Vista. Console command:
NET USE LPT2: \\MyComputerName\MyPrinterName /Permanent:yes

After successfully executing the NET USE command, you can use the USB-printer (must have a driver installed) just like a parallel printer.

Regards,
Guenter



von Jimbo - am 19.10.2009 17:23
Hi.

We use iEscape(..) to print on windows printer in native language (not a
windev report)
Select the printer with iConfigure(...) and it should work fine.
I used this on Zebra/Tec/.... thermal printers, and it do the trick.
If your printer is an opos printer there should be an ActiveX from epson
to gain access to it directly.

Bye

Goof

Freddy a écrit :
> Hi,
> I need to print to a USB connected, or parallel with parallel - USB cable, Epson TM-T88III or TM-T88IV ticket printer using a Generic/Text only installed printer.
> In the manual there is only a Visual basic example with code like this:
> PRINT #1, CHR$(&H1B);"@"; 'Initializes the printer (ESC @)
> PRINT #1, CHR$(&H1B);"a";CHR$(1);'Specifies a centered printing position (ESC a)
> PRINT #1, CHR$(&H1B);"!";CHR$(0); 'Specifies font A (ESC !)
> PRINT #1, "January 14, 2002 15:00";
> I don't find a way to translate this to Windev code, because I find only the caract() function for sending decimal escape codes but not for hexadecimal like in the basic example.
> Thus sombody know a way how to do this ?
> Kind regards,
> Freddy
>
>
Message forwarded from pcsoft.us.windev

von Goof.pcs.crosspost - am 20.10.2009 15:48
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.