Last post Dec 08, 2016 08:22 PM by Rivelyn
Dec 08, 2016 07:27 PM|Rivelyn|LINK
I am stuck trying to do a very basic functionality with an extremely simple command sent to a Zebra Label Printer.
I downloaded the demo and was able to get printing in my site with their code examples now I am just stripping down to the bare bone basics to start building from there.
Here is what I have in my controller.
public ActionResult Index()
WebClientPrint.LicenseOwner = "";
WebClientPrint.LicenseKey = "";
//Create a ClientPrintJob obj that will be processed at the client side by the WCPP
ClientPrintJob cpj = new ClientPrintJob();
//use default printer on the client machine
cpj.ClientPrinter = new NetworkPrinter("192.168.0.115", 9100);
string pCommand = "^XA";
pCommand = pCommand + "^CFA,30";
pCommand = pCommand + "^FO10,5^FD$9.95^FS";
pCommand = pCommand + "^FO150,5^FD4067^FS";
pCommand = pCommand + "^FO450,5^FDCOL^FS";
pCommand = pCommand + "^FO10,35^FDThis is the category desc^ FS";
pCommand = pCommand + "^BY8,2,75";
pCommand = pCommand + "^FO10,70^BC^FD4067^FS";
pCommand = pCommand + "^XZ";
//set the commands to send to the printer
cpj.PrinterCommands = pCommand;
cpj.FormatHexValues = false;
//Send ClientPrintJob back to the client
System.Web.HttpContext.Current.Response.ContentType = "application/octet-stream";
I just get prompted to save or open a file that is a simple text doc containing the cpj contents.
Any help would be great!
Dec 08, 2016 08:22 PM|Rivelyn|LINK