JamesBowen
19+ years progress programming and still learning.
HI
We have a working process which enables us to print from linux back thought a PuTTY terminal and it's done using a PHP script. So I tried to duplicate the code into OE and I came up with the following code. However it does not work quite right. Why?
The output onto paper comes out like this:
22;1H21;1HThis21;6Hshould21;13Hcome21;18Hout21;22Hof21;25Hthe21;29H printer.22;
We have a working process which enables us to print from linux back thought a PuTTY terminal and it's done using a PHP script. So I tried to duplicate the code into OE and I came up with the following code. However it does not work quite right. Why?
Code:
DEFINE STREAM sTerminal.
DEFINE VARIABLE cSimpleText AS CHARACTER NO-UNDO.
cSimpleText = 'This should come out of the printer.'.
OUTPUT STREAM sTerminal TO TERMINAL PAGED.
PUT STREAM sTerminal CONTROL CHR(27) + '[5i'.
PUT STREAM sTerminal UNFORMATTED cSimpleText.
PUT STREAM sTerminal CONTROL CHR(27) + '[4i'.
OUTPUT STREAM sTerminal CLOSE.
22;1H21;1HThis21;6Hshould21;13Hcome21;18Hout21;22Hof21;25Hthe21;29H printer.22;