Print client side from web application using Zebra printer - c#

Is there a way (and what is that way) to print to a locally connected (client side) Zebra printer (using custom ZPLs and Layouts) from a web application (IIS, C#)?
I need to be able to print more or less generic data, so I can't really use the normal printer screens, because the layouts/ZPL we use are customly made and generated automatically.
What do I need to create in order to have a connection between the web page and the client? Maybe ActiveX or something?

Take a look at jZebra, a small embedable Java applet which facilitates printing to label printers.
The applet is fully controllable from JavaScript, and there are a lot of samples and tutorials. I am using it on Zebra GK420t, but any label printer can be used, since the applet uses raw mode printing.
It's open source, see it here: http://code.google.com/p/jzebra/

Related

What are the purposes of these three connection options for printing the label in ZPL?

I have these three radio button inside the group box named Printer Connection in the windows form:
a. Network
b. Serial
- dropdownlist
c. Web service
User has to choose one of the option from above before printing any labels or clicking the button Print Label. If someone would explain about the purpose of web service and the scenario how it can be utilize to connect to the printer and printing label. Thank you!
It is hard to understand what app you are using but I have to imagine you are using something based off of the Java SDK by Zebra. In this SDK there is a Web Services SDK. It comes with a .war file that gets added to a Tomcat server. Printers have a set of settings which when configured will have the pritners establish a connection to the server with the .war file installed. Once the printer has connected you can use the Java SDK functions to communicated with the printer from that server.
This explanation is probably over simplified, but if you look through the help documentation on the SDK you will probably get a better explanation.

Get C# RDP Screen Byte Data

I need to get the screen byte data from an RDP client using the built in RDP/(Microsoft Terminal Services Control Type Library) libraries Microsoft provides for C#. It would be great if I didnt have to use a windows form as well to host it which 'seems' to be required as shown in most of these c# rdp examples.
My basic use case here is that I need to transfer the screen byte data coming through the network rdp client(Microsoft Terminal Services Control Type Library) to display in a different medium that is not a C# windows form.
Is anyone aware of a method to achieve this?

Does Windows CE 5 have a standard printing system?

I’m looking at creating a stand-alone application that scans several bar codes and at the end prints a receipt. I’m trying to understand from a developer prospective if there are standard calls to print via Windows CE.
The yet unspecified device would support at least Windows CE 5 up to a Windows Mobile 6/6.5. These would be a Motorola Symbol/Datalogic type hand held scanning terminal. The application would be used on whatever device we chose, not a broad range of products.
I’ve seen third-party libraries listed. Are these still relevant with more modern Windows Mobile releases?
I can send the specific codes to a printer outside of a printing system, but I don't want to go that route if printing is can be done "normally."
I expect to use VS 2005 or 2008 with C# depending on the model's support.
There is no printer support on Windows CE devices. What we've successfully done is to connect a Zebra receipt printer to the device via Bluetooth and send ZPL code directly to the COM port emulation. We were able to print on that device like this.
There is, however, no standard way that I know of.
While I'm not sure what more detail I could add, I'll try my best to describe what we did:
We had a little Windows CE industrial device (while I think it was a Datalogic device, the process should work with other devices, too) with Bluetooth support and a Bluetooth receipt printer that was capable of understanding the Zebra printer language (ZPL).
We connected the printer to the device via Bluetooth so that we could access the printer via a "Bluetooth COM Port". From then on, we were able to send ZPL code to the printer from our own applications and have the printer print what we sent, just as if the printer was directly connected using a serial cable.
In our application we had a little ZPL template into which we filled the information required. The user was then able to walk around with the mobile device, fill in forms and print labels.
The only catch was to re-enable the Bluetooth pairing after the scanner had gone into suspend mode, but I guess that's something you have to figure out depending on the device types - maybe there are even settings to have the connection re-established on your device.

Communication with Zebra RFID Printer | C# .NET

We are developing an application which prints RFID labels using Zebra RZ400 RFID printer. Until now, we were sending ZPL commands by RawPrinterHelper class which makes call to winspool.drv.
However, we soon realized that not all tags are printed successfully so we looked for a way to get feedback about the success of the last print operation. There is a command "^RV" that is said to return a string upon a print operation that reflects operation success result.
Now, the problem is we don't know a way to get this feedback data from printer! RawPrinterHelper class does not have any method to get data.
I connected the printer to USB and used LibUsbDotNet library to communicate with the printer. I can send commands to printer successfully including "^RV" command and read from USB again to get the feedback from printer. I can get the feedback value but not every time, only once after randomly printing lots of tags.
Is there an offical SDK from Zebra to communicate with printers? What can be wrong about USB communication? Please share your experiences regarding Zebra .NET development.
There is an official Java SDK which does bi-di communications to the printer using the Windows driver (for USB. It does direct for Tcp). There is also a Windows Mobile SDK from Zebra which might work for you.
You can try dropping in the dlls, and then take a look at the UsbPrinterConnection class. Lemme know if it works for you
TCP/IP Bidirectional Programming Example Using Sockets - C#
https://km.zebra.com/kb/index?page=content&id=SA140&actp=LIST

Printing into a particular printer on c#

I have a web application in ASP.NET and c#. Is it possible to print in a particular printer attached to server for all print button click..??
Ie, If one clicks print button on client machine, the print is taken on the printer attached with the server....
If anybody knows this pls help me..... thanks in advance
What type of document do you want to print? The server would need a way to execute an application and call the print command.
There are a number of related questions on StackOverflow ->
I found a way to do something similar to what you described but it was far from easy.
When the user presses print the document requiring printing was written as a byte array to a database table that also had a "Printed" flag (false by default) and the name of the chosen printer.
On the server that hosted the database I built and added a windows service that polled the database table to see if there any documents on the table that had "Printed" set to false. If it found any it read the byte array and passed it on the the specified printer (setting the printed flag to true).
Problems
You have to give the service logon details with sufficient permissions to access the printer
Web services do not support the system.Printing or system.drawing.printing name spaces so I had to connect to the printer using TcpClient, the IP address of the printer and port 9100 (this is the default port for raw printing). I then passed the stream directly to the port. This worked but I only ever needed to print PDFs that my networked printer was able to support.
For more information on printing raw data see here
I don't recommend doing it exactly as I describe, but hopefully this might give you some ideas

Categories