Good evening
I am trying since quite a while to print escape codes on a usb printer without success.
The following code will open a cash tray when the printer is connected to a "dos type" parallel port (lpt1, lpt2 or lpt3)
CPORT := OPRN:GETPORT()
CDOSPRT := TDOSPRN():NEW(CPORT)
Ntext := SPACE(45)
Ntext := "CHR(27) +'p'+ CHR(0)+CHR(100)+CHR(100)"
CDOSPRT:Say(0,00,&(Ntext),.F.) // open Cash
CDOSPRT:END()
the code will not work anymore if the printer is "virtual epson lpt" or worst if it is usb.
I am trying to find a replacement as tdosprn can not be used anymore in my case and in today's printers.
I have tried the following without succcess
#define PASSTHROUGH 19
ESCAPE( oprn:hdc, PASSTHROUGH, nText) // ntext is the same as above
I have also tried xharbour functions without success
printsend(CHR(27) +'p'+ CHR(0)+CHR(100)+CHR(100),ICAISSE) // icaisse is the correct name of the printer
And also
CFILE := "c:\test.TXT"
nHandle := fCreate( cFile )
FWRITE( nHandle, NTEXT)
fClose( nHandle )
PrintFileRaw(ICAISSE,CFILE)
Again no success.
I really do not know where to go from here....
Has anyone succeeded sending escape codes to "USB" printer or Epson virtual printer (windows driver) ?
If yes, could you share a sample ?
Thanks in advance for your time,
Richard