Цитата:
Сообщение от
ivas
Asciiio txtFile;
;
txtFile = new Asciiio("LPT" + int2str(_port + 1), "w");
txtFile.write(_text);
Работает, только почемуто кодировка неподходит, нужно DOS (ASCII).
Вобщем спасибо ivas, что навел на мысль.
Вот что получилось:
X++:
TextIO txtFile;
str scriptZebra, printerName, paramStr;
int z = 1, posCh = 0, numCh, i;
container cnt;
// раскладываем строку;
while (1 > 0)
{
numCh = strFind(_printStr, '|', posCh, strlen(_printStr));
cnt += substr(_printStr, posCh + 1, numCh - 1);
_printStr = strDel(_printStr,posCh + 1, numCh);
if (strlen(_printStr) < 1)
{
break;
}
}
scriptZebra = '\^\^XA\^\^A@N,0,0,E:Cyri_ub.FNT'
+'\^\^FO010,010\^\^A@N,40,35\^\^FD'+conPeek(cnt, 1)
+'\^\^FS\^\^FO250,010\^\^A@N,40,35\^\^FD'+conPeek(cnt, 2)
+'\^\^FS\^\^FO010,050\^\^A@N,40,35\^\^FD'+conPeek(cnt, 3)
+'\^\^FS\^\^FO010,090\^\^A@N,40,35\^\^FD'+conPeek(cnt, 4)
+'\^\^fS\^\^FO010,130\^\^A@N,50,40\^\^FD'+conPeek(cnt, 5)
+'\^\^FS\^\^FO260,135\^\^A@N,40,35\^\^FD'+conPeek(cnt, 6)
+'\^\^FS\^\^FO010,190\^\^A@N,40,35\^\^FD'+conPeek(cnt, 7)
+'\^\^FS\^\^PQ1\^\^XZ';
printerName = '\\\\comp_name\\Zebra';
txtFile = new TextIo(printerName, "w", 866);
txtFile.write(ansi2ascii(scriptZebra));