Hello,
I have 2K bytes text file(Zebra label printer code) i want to edit certain fields in this file before sending it to printer via serial connection i.e. item price or company name. is there a method to seek text within file and replace it, as loading whole file into array is memory consuming. ZPL file looks like this:
^FT160,128^XG000.GRF,1,1^FS
^FT20,87^A0N,28,28^FH\^FDPrd. ID^FS
^FT21,46^A0N,28,28^FH\^FDCCCC^FS ' I wand to edit this line, CCCC = company name
^BY2,2,28^FT73,176^BEN,,Y,N
^FD0123458888881^FS
I have 2K bytes text file(Zebra label printer code) i want to edit certain fields in this file before sending it to printer via serial connection i.e. item price or company name. is there a method to seek text within file and replace it, as loading whole file into array is memory consuming. ZPL file looks like this:
^FT160,128^XG000.GRF,1,1^FS
^FT20,87^A0N,28,28^FH\^FDPrd. ID^FS
^FT21,46^A0N,28,28^FH\^FDCCCC^FS ' I wand to edit this line, CCCC = company name
^BY2,2,28^FT73,176^BEN,,Y,N
^FD0123458888881^FS