Problem
I am trying to send zpl RAW to print server. There is a Zebra ZM400 printer. I could get PrintServer, PrintQueue objects. Also, I could add a job, and write to its JobStream.
I checked print queue (on Windows), and the document was sent. The printer data light blinks for 1/2 seconds.
Progress
Here is my code for print to print server:
PrintServer ps = new PrintServer(@"\\192.168.1.1");
PrintQueue pq = ps.GetPrintQueue("Printer 01");
Byte[] myByteBuffer = Encoding.ASCII.GetBytes(
@"^XA^MMP^PW300^LS0^LT0^FT10,60^APN,30,30^FH\^FDSAMPLE TEXT^FS^XZ");
PrintSystemJobInfo psji = pq.AddJob();
psji.JobStream.Write(myByteBuffer, 0, myByteBuffer.Length);
psji.JobStream.Flush();
psji.JobStream.Close();
Issue
When I check print queue (on Windows), the document has 0 bytes. And then, the printer prints nothing.
Do I missing some special char? Or, do I send wrong raw data?