I am writing a .Net WPF application using C# for a Windows 7 64 bit platform. My application needs to communicate with a Zebra KR403 printer connected through USB. My questions may be very basic, but I'm hoping this post will help others who are new to using this printer in .Net.
1. Which SDK should I be using? Is it as simple as adding a .dll to my project and using it? I have tried using the Windows CE SDK, but I get a BadImageFormatException when the ZSDK_API.dll tries to load ZebraUsb.dll. This usually means that the dll was compiled for a different platform.
2. Should I be using the SDK to print or should I be using the normal .Net printing libraries? What are the advantages of the 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 do I get the status of the printer (out of paper, media not loaded, etc.)? I have found a guide (had to remove link; reputation not high enough to post more than 2 links) which explains how to do it in Windows CE or Mobile, but I cannot find the equivalent for Windows 7 (the normal desktop version).
If someone can help me with these questions I would greatly appreciate it and I will post my final solution (or the core code needed to do the above) here for others to use.
Thank you in advance for any help.
UPDATE:
I found some code that allows me to communicate directly to the printer over USB here: http://danielezanoli.blogspot.com/2010/06/usb-communications-with-zebra-printers.html
I also found a hardware integrators guide for the KR403 printer which 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%2FKR403_UG.pdf&highlightinfo=12583129,8815,8825
I am now able to send the ~HQES command to the printer over USB using the above library or over serial port using the SerialPort class from .Net. I can then interpret the result using the hardware integrators guide above and check the status of the printer. Since this is easy enough to do I'm not going to try and port an SDK at this point.
I found some code that allows me to communicate directly to the printer over USB here: http://danielezanoli.blogspot.com/2010/06/usb-communications-with-zebra-printers.html
I also found a hardware integrators guide for the KR403 printer which 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%2FKR403_UG.pdf&highlightinfo=12583129,8815,8825