I am writing a .Net WPF application using C # for a 64-bit Windows 7 platform. My application must communicate with a Zebra KR403 printer connected via USB. My questions may be very simple, but I hope this post helps others who are not familiar with this printer in .Net.
1. Which SDK should I use? It is as simple as adding a DLL to my project and using it? I tried using the Windows CE SDK, but I get a BadImageFormatException exception when ZSDK_API.dll tries to load ZebraUsb.dll. This usually means that the dll was compiled for another platform.
2. Should I use the SDK for printing, or should I use regular .Net print libraries? What are the benefits of two options? For example, if I use .Net libraries for printing, will I still have to use ZBI (the language used to communicate with the printer)?
3. How to get printer status (from paper, media not loaded, etc.)? I found a manual (I had to remove the link, the reputation was not high enough to accommodate more than two links), which explains how to do this in Windows CE or Mobile, but I can not find the equivalent for Windows 7 (normal desktop version).
If someone can help me with these questions, I would really appreciate it, and I will post my final solution (or the basic code needed to execute above) here so that others can use.
Thanks in advance for any help.
UPDATE:
I found a code that allows me to communicate directly with the printer via USB: http://danielezanoli.blogspot.com/2010/06/usb-communications-with-zebra-printers.html
I also found a guide for hardware integrators for the KR403 printer that explains the result of the ~ HQES command here: https://support.zebra.com/cpws/docs/crawl/UG_Kiosk/KR403_UG.pdf#xml=https://km.zebra .com / kb / index? page = answeropen & type = open & searchid = 1363543831914 & answerid = 16777218 & iqaction = 6 & url = https% 3A% 2F% 2Fsupport.zebra.com% 2Fcpws% 2Fdocs% 2Fcrawl% 2FUG_Kiosk% 2Fp8408f8f8f408f408f408f40f403ff8f403ff8f40340f123ff840f3ff8f40340f123ff840f3ff8f40340f123
Now I can send the ~ HQES command to the printer via USB using the library above or via the serial port using the SerialPort class from .Net. Then I can interpret the result using the hardware integrator guide above and check the status of the printer. Since this is easy enough to do, I'm not going to try to connect the SDK at this point.