CPCL printing programming testing - printing

I'm trying to test code that sends a printing message to an iMZ320 printer. The printer takes instructions in the CPCL programming language. I don't have access to a printer I can print to, but I need to check some changes I have made to the printer code are formatting correctly. Is there any way to do that to test the code is displaying correctly?

Unfortunately the answer is no. Without access to the printer you cannot preview the changes. Online tools like Labelary are only compatible with ZPL. In practice, I find that even when I'm generating code from a WYSIWYG tool like Zdesigner, I always need to test and fine tune on an actual printer.

Related

Zebra 105SL (Plus) 2-way communications

I have written a printing application that works well. I can write files, update settings and do most all functionality from one console. But one aspect of the program has eluded me for quite a while: the ability to read the Zebra register/configuration values.
It would be good to periodically be able to read the values on the Zebra and compare them to default known good standards and to be able to reset them if necessary.
Currently, in order to see these values, I need to either use the built-in web page (networked printers only), print a report, or scroll through the printer interface. What I really need to is a method to be able to read these registers values and create a known good setup file.
Has anyone been able to find any SDK or trick to read these values using .NET (C# or vb.Net)?
The application is a windows desktop utility used on my shop floor and I communicate with the printers using either LPT and ethernet interfaces (as applicable).
I would recommend checking out the Zebra Link-OS SDK which has a lot of functionality when it comes to what you can do with Zebra printers. Specifically they have a section titled "Getting all printer settings and their configuration". However the code example they provide will not work unless your printer is a Link-OS enabled printer. If that happens to be the case then great! If not you can use the SGD class within the Zebra.SDK.Printer namespace to use Set-Get-Do commands to retrieve and change information. More information on SGD can be found in this ZPL manual under the SGD Printer Commands section.

best way for design and print barcode label from handheld (ce5/compact framework) to zebra mobile printer

What i want is
Design a label layout(barcode on it).
Scan the information by handheld and print the label directly from mobile printer linked with bluetooth.
want to know:
best way to implement this? see my preferences list below
1) free of charge
2) the API should have 2D barcode support
3) label layout can be designed by Drag-and-drop. The best is a visual studio control. so we do not need too much coding.
Hope someone has experience can share some to me, what cotrol? what liberary? Must use zebra specific printing language?
Kindly show a technique chain of the best(easy, free). Thank you all.
You should try and go with the Zebra SDK (for windows ce too). I assume there is no drag and drop GUI designer tool. But you may examine the code generated by a label designer application printing to a zebra printer using file: as output port.
Zebra provides good SDKs, samples and support. For example to print a QR code:
^XA^FO100,100^BQN,2,10^FDYourTextHere^FS^XZ
You see, it is more or less readable where to replace text to get another QR barcode.
see also https://km.zebra.com/kb/index?page=content&channel=SAMPLE_CODE
You may need to study the ZPL programmers guide and then you can start to print your own mind-designed labels. Printing meeans to send ZPL code lines directly to the printer.

How to change the print options in POS?

I would like to use POS with my custom printer. So the form of the bill /invoice is formated for a small printer. I would like to print on normal A4 paper. how can I edit the settings of the outgoing printing in POS?
Usually POS requires COM device to print. You should read the printer programming manual to see how to call the command. If USB, you should use the vendor's USB library.

Printing Barcodes on RuggedJet printer

I need to print a barcode on a Brother RuggedJet printer from a Window Mobile device. The SDK provided by brother does not have a method to do this.
However most printers have a native mode that you can put them into and then send escape sequences to do things like print barcodes. I've done this with other printers.
Does anyone know the native printer language for the Brother RuggedJet? And if so what are the escape code to print Code 123 barcodes.
You should contact Brother's Customer Support to see if they can get you in touch with some department that deals with the SDK or Technical Documents for their products.
I use Code 128 for our Barcodes, and to get them to print out, I use the OnPaint event to write using e.Graphics. I could post some of that code here, if you can use Code 128, but most of it I found from someone else, and I honestly never took the time to understand what it is doing.

How to print (barcode) labels from a Ruby on Rails Application?

My first application I have developed in RoR is for some Kiosk Touchscreen PCs used in our stock. When the stock worker picked up some material he enters the quantity in a Form.
Now I want to print a label containing: customer name, material description, quantity, and a barcode on our Zebra printer.
How would I do that from a Ruby on Rails Application ?
Sending directly the control chars needed for ZPL (Zebra Printer Language) from the controller ? ( not very comfortable )
Create a view in HTML send it to the client, and the client has to print it. ( not very confortable and error prone, as the stock worker has to do additional steps, may choose the wrong printer or maybe don't print the label at all )
Create a pdf document from the controller and send it to the printer from the server ( oh, no the printer does not understand pdf, so I have to control a pdf reader to do the printing ?? That wouldn't be very fast as it will send the label as a graphic image to the printer
Create a gem which will hide all the logic needed for printing ? ( Are there any gems which already do this ? )
I would appreciate every comment.
Thanks
Klaus
I would send the raw ZPL to the printer. You can use a tool like Bartender (I would suggest installing Bartender Only from that link. You can basically design your label in this tool. After you've designed your label you would download the bartender printer drivers for your zebra printer and set up a dummy printer with these drivers and print this label you designed to a file. This will give you the raw zpl. From this you can basically substitute all the dynamic data into the zpl file you printed in the previous step and send this directly to the printer via serial, tcp/ip or usb.
Edit: I found a much better solution as I continued to dig on this. This is pretty significantly edited down to focus on the Java applet solution I ended up using.
Basically, you will generate the label as raw ZPL text. You then need to get that plain text to the printer, which will generate the label.
If your server can access the printer's IP address, you can copy the ZPL to the printer directly from the server process. If it's a remote web app, you need to get the client to send the ZPL for you. Browser sandboxing makes this hard to pull off - drivers want to helpfully get in the way. There are a few options; the most common is to use a small Java or Flash applet to do the actual copying. If you can get the specific web browser your users are using to print to a plain text printer without adding anything, you could use local printing, but generally the most robust approach is to use a helper Java applet.
The Java applet I use for this is jZebra: http://code.google.com/p/jzebra/
It's a very clean & straightforward approach, look at the sample HTML in the download package and a few lines of code print the label. I just edited down the sample and am planning to use it as my production code popup.. it's really that straightforward.
Two caveats with this approach:
Your users must have the JRE installed
jZebra finds the Zebra printer by printer name. There are very specific guides (they have detailed instructions for Mac, Windows, and Linux setup) for what you need to do - but it's well documented and you just have to have your users follow the instructions. Once it's set up correctly it works great.
More simple solution, and I believe better as well, Usually most of browser and machines has PDF viewer installed. So just create labels as PDF documents and sent it to browser.
We have implemented label printing using Zebra printer in ROR following way.
Create exact format label pages in html.
Convert the html to pdf using wickedPDF.
Usually labels contains barcodes as well.
So overall solution would be,
Create barcodes using barbie gem.
Create html using barcodes and your actuall data that needs to go on label.
Convert html view to PDF.
Sounds like a job for a ruby C extension. Perhaps one that also wraps something like gnu barcode http://www.gnu.org/software/barcode/ library and some other open standard for the zebra printer, if one exists? I once did a rails app that made coupons and made heavy use of gnu barcode, but I did simple shell command to interface to it.

Resources