I use this code to print text file to POS printer (EPSON):
AssignFile(prnfile, 'file.txt');
Reset(prnfile, 1);
AssignFile(port, 'COM3');
Rewrite(port, 1);
repeat
BlockRead(prnfile, buffer, SizeOf(buffer), Read);
BlockWrite(port, buffer, Read);
until EOF(prnfile) or (Read <> SizeOf(buffer));
CloseFile(prnfile);
CloseFile(port);
Text is printed, but I need to cut a receipt. I have EPSON command codes, but I don't know how to send them to printer. Can anybody write an example?
Thank You.