I attached the APD documentation. Only certain printers are supported via APD. Another option is to open a BT connection and talk to the printer directly.
APD - Programmers Manual.pdf 350.3 K
1 of 1 people found this helpful
Think of the APD as a printer driver.
First you have to tell the driver where the printer is.
The PID can be found using the Print Type Codes Manual.
Second you need to create your print job. The way this job is created is specific to the printer you are using. See the printer manufacturers website for information on how to do this. Since I'm a Zebra person, I use ZPL language to create labels.
Third you send the print job to the printer
Code looks like:
apd.PSExternal(261,"BZ40:1|" + bluetoothMac);
This is the most basic way to use the APD to print. Once you have done this, I highly recommend trying to create templates and use the APD to dynamically pick printers. Information for how to do this is documented well in the APD manuals. Templates will allow your users to switch printers and use dynamic data.
There are other options for printing but using the APD is the easiest. Other methods give more feedback from the printer.
Thanks Robin for your quick response. Currently we are trying to print from a Zebra GX420t printer. We´ve already checked the list of compatible printers from the URL you sent me, but the PID for the GX420t is not there. Do you know where can I find it?, Can I use another compatible PID for the GX420t.
Second, I need to know whether APD is part of RhoElements or I have to download separately, if it´s the second choice how can I use it from our RhoElement application?.
Thanks in advance for your help.
The documentation has not been updated in a while so most of the current Zebra printers are not listed. I've found though that you can use a 'Z' followed by nearly any two numbers. I usually use Z40 as the ID for my ZPL printers (including the GX420). I change to Z41 - Z49 for printers with differing widths or ones that need different ZPL templates.
The APD is installed as part of the standard RhoElements runtime apk. You should see an APD folder in the rhoelements installed directory of the MC40. This folder is where you put your formats and templates. The apd object is loaded with each HTML page you load. There is no need to do anything but call the object from any page you want like in the code I posted. Be aware it won't be available on any other browser, so you need to test on the MC40 itself.
Thanks Robin, we are totally new printing from mobile devices, thus your help is highly appreciated. We will try with the Z40 PrinterID. We have read a lot of documentation and examples from launchpad so I hope our project works well.
Have a good day.
Your are welcome Guillermo.
Do me a favor and mark my reply as the correct answer please?
Sure! I will.