Building a RhoElements Zebra Badge Printing Application
Building a RhoElements Zebra Badge Printing Application
Building a RhoElements Zebra Badge Printing Application
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Building</strong> a <strong>RhoElements</strong><strong>Zebra</strong> <strong>Badge</strong> <strong>Printing</strong><strong>Application</strong>Davide Schembari (MSI)Gary Malcolm (<strong>Zebra</strong>)
Welcome
Agenda• Introduction• <strong>Badge</strong> printing with <strong>RhoElements</strong> and <strong>Zebra</strong>ZXP printers• APD (Adaptive Printer Driver)• Wristband printing with <strong>RhoElements</strong> and<strong>Zebra</strong> HC100• Label printing with <strong>RhoElements</strong> and <strong>Zebra</strong>QLn320• Related sessions
Introduction• Modern enterprises require printing operations atany level of the organisation.• When barcode printing is involved, it most likelymeans that printing is a vital part of the assetmanagement and logistics of the business.• Driving a modern printing infrastructure can bevery easy when the right tools are used.• Users at any level ask for simplicity, ie.:• The end users just wants to print a label with relevantdata;• Developers want to focus their resources in the actualdesign and user experience, not working out how thedifferent printers work.
RhoMobile Suite & <strong>RhoElements</strong>• Motorola provides the developercommunity with RhoMobile suite.• RhoMobile Suite and its enterpriseextension <strong>RhoElements</strong> overcome thetraditional compromise between consumerexperience and enterprise robustness.• Cross-platform: develop ones and deployin several platforms (Android, iOS, etc.)
How did we print your badges?HTTP post (delegatename)WebServiceCloudXMLtemplate
ZXP Print Manager Interfacecomponents• ZXP Print Monitor• Monitors and logs printer status for ZXP-8, 7, 3• Administrator for Print Manager• ZXP Print Manager• Managed Network Card <strong>Printing</strong>• Device Output (ZMotif, XML, CSV, binary)• Interface Commands• For data streaming ( Store, Submit, Delete, Request )• Template XML specification• Defines card layout and data binding• Data Document specification• Identifies template and data to be bound• Job Document specification• Self contained data and card layout, does not require template8
<strong>Zebra</strong> ZXP Print ManagerPrintMonitorPrintPrintPrintQueue 2 Queue 1Manager
APD• APD is a simple, yet powerful interface to<strong>RhoElements</strong> applications to transfer tovirtually any portable printer via Bluetoothor Wireless LAN.
Why use APD?• APD takes care of connectivity• APD abstracts your applications from thedifferent printer command languages• This means that the application only needs• This means that the application only needsto set the actual data to print and to whichprinter
What can APD print?• Receipts• Labels• Tags• Tickets• Wristbands• Whatever the printer can print!
Template files?• In order to use the full potential of APD, youwill need to create template files• Template files contain the layout of the pageyou want to print encoded in the printerlanguage (i.e. CPCL, ZPL), plus placeholdersfor the variable data. This placeholders arethe ones used by APD to position the datafrom your application inside the template. Theresulting data will be then sent to the printer.
Wristbands with <strong>RhoElements</strong>and <strong>Zebra</strong> HC100• The <strong>Zebra</strong> HC100 is a 300dpidirect-thermal printer able toprint wristbands for multipleapplications such as patientid’s, security, promotionalwristbands etc.• It supports ZPL language,therefore it can be used withAPD.
How to create the wristbandtemplate file• As the HC100 supports ZPL, this enables<strong>RhoElements</strong> developers to make themost of the printer in the simplest possibleway, which is using APD.• The best tool to create a template for a<strong>Zebra</strong> printer is <strong>Zebra</strong> Designer.
Done!^XA^MMT^PW291^LL3300^LS0^FT80,1808^BQN,3,7^FDMM,A$$[1]$$^FS^FT181,2677^A0B,58,57^FH\^FD$$[1]$$^FS^FT267,2677^A0B,58,57^FH\^FD$$[2]$$^FS^FT92,2674^A0B,83,81^FH\^FDAPP FORUM 2012^FS^PQ1,0,1,Y^XZ
How to name the template file?• APD has only one requirement about thename of the file containing the template:• The extension needs to match the printer type• So for instance, as the HC100 is a Z41-• So for instance, as the HC100 is a Z41-type printer to APD, we can name thetemplate as “mywristband.Z41”
How to use the template inJavascript...• APD offers a Javascript interface to the<strong>RhoElements</strong> developers, which can beused with any application paradigmoffered by RhoMobile Suite, either nativeapplications or web.
...code snippet• function printWristBand(){}apd.PSExternal(261, wlanPrinterId);alert(apd.PSExternalEx(266,"$$[CMD:0101,1]$$\r\nmotowristband\r\n"+ document.frmWristband.txtName.value +"\r\n" +document.frmWristband.txtCompany.value+ "\r\n"));
Labels and receipts with<strong>RhoElements</strong> and <strong>Zebra</strong> QLn320• <strong>Zebra</strong>’s popular QL family ofdirect thermal mobile labelprinters represents one of themost popular choices in theindustry, therefore developersof enterprise solutions oftencome across it.• It supports CPCL language,therefore it can be used withAPD.
How to create the a receipt orlabel template file
Done!! 0 200 200 414 1PW 487TONE 0SPEED 4ON-FEED IGNORENO-PACEBAR-SENSET 4 0 119 83 $$[1]$$T 4 0 119 156 $$[2]$$BT 7 0 0B F39 1 30 111 36 273 $$[1]$$3PRINT
How to name the template?• As the QLn320 is a C53-type printer toAPD, we can name the template as“receipt.C53”
code snippet• function printReceipt(){}apd.PSExternal(261, btPrinterId);alert(apd.PSExternalEx(266,"$$[CMD:0101,1]$$\r\nreceipt\r\n" +document.frmWristband.txtName.value +"\r\n" +document.frmWristband.txtCompany.value +"\r\n"));
Don’t miss out!• Tomorrow:• Deploying Web Apps natively (10:50, Queens)• Using RhoStudio to build Cross-platform Apps(13:30, Queens)• Thursday:• Using device capabilities in your<strong>RhoElements</strong> <strong>Application</strong> (15:20, Queens)
THANK YOU!Q&A