-
- 05 Feb
Step by Step Instructions for Sending Encoded CPCL Directly to Zebra Printer with Mobi Print v 2.53
Programming Printer in CPCL:
- Obtain Zebra W-Fi printer (usually a label printer) or the Zebra iMZ Series for Bluetooth (receipts only)
- Connect device to Wi-Fi network or attach Bluetooth to iOS device.
- Download and install latest version of Mobi Print from the App Store
- https://itunes.apple.com/us/app/mobi-print/id701088704?mt=8
- Connect printer under Printer Setup in Mobi Print.
- Once connected, go to Printer Utilities and select Printer Language. Select CPCL, and make sure to click Send. The printer won’t do much, but you will see it flash or something briefly will appear on LCD. (You can verify it is in CPCL by then clicking the Get button on the Printer Language line)
- Once printer is in CPCL mode, it is ready to accept an encoded CPCL string.
- Go to the Print page in Mobi Print
- Exit Mobi print by tapping home button, and go to link below in Safari or Google Chrome.
- http://mobiprintapp.com/send-zpl-files-straight-to-mobi-print/
- On the bottom of the post is a hyperlink entitled “Test link”. Click that. It will bring you into Mobi Print page. (For the first time, it might take 4-5 seconds as its downloading your CPCL format into an array in the app.)
- Then hit Print to confirm it worked. You have the option click insert variables for manual entry of items on the format or have the entire code from your web service insert the variables (This likely won’t be necessary; however, if you want to enter variables on the Mobi Print side there are scanners available that can input text into the variable fields HERE. You would designate _var_1_ or _var_2_ in your original ZPL code (before encoding) and it then will also allow you to enter an additional variable inside Mobi Print.
Designing Label Formats:
- Download Zebra Setup Utilities and install printer driver. (This is likely the CD that comes with printer or visit http://www.zebra.com/us/en/products-services/software/zebralink/zebra-setup-utility.html to download)
- Next install Zebra Designer from http://www.zebra.com/us/en/products-services/software/link-os/zebradesigner-pro.html#mainpartabscontainer_71ac=downloads (If using an iMZ, select another mobile that shows the ZPL option such as a QLn320 ZPL).
- Design the receipt/label for the static information that will never change. Put text as the placeholder for places to put variable information that your web service will fill in | examples: <description> <part_number> ..etc
- Click print, and verify the label prints correctly on your printer. If all is well, proceed.
- Click Print again, and then on print dialog screen, select print to file. Save the file to desktop, it should be a .prn file (you can open a PRN file with Notepad to verify the information).
- Open .prn in a text editor. This is your RAW cpcl code.
- You would then place that variable or the result into the Mobi print call URL..encoded with base64
- arrowhead://x-callback-url/cpclcode?code=<CPCL_CODE>
- arrowhead://x-callback-url/cpclcode?code=$str
- [code]arrowhead://x-callback-url/cpclcode?code=XlhBXkZPMTAsMTAwXkJZNl5CRk4sNiwyMF5GREV4YW1wbGUgb2YgWlBMIEVuY29kaW5nXkZTXlha [/code]
On your iOS device, with MobiPrint and a connected zebra printer, you can test via this link below.
Here is a Test Print link (click here)
About the Author
mobiprint
Comments (2)
Leave a comment
You must be logged in to post a comment.
This is very helpful! If you could provide a link that explains how to generate the CPCL code for printing a PNG or a PDF417 barcode.
If you download Zebra Designer, you can place a PDF417 barcode on the canvas. Once you print to file, it will be a .prn file. You can open this with notepad and that is your CPCL code.