Advanced samples for direct monochrome printing with G and Z commands?



I've got a hard time getting direct printing via ESC commands G and Z (as defined in "EPCL Programmer’s Guide 980415-001") working. My printer is a Zebra P330i with firmware version 3. I'm using the ZBRPRNSendCmdEx from the latest Value/Performance Class SDK. Lastest drivers (10.0) are installed.


Sending the G command (<ESC> G 0 0 10 640 1024 <CR>) works fine. But the following Z command makes the ZBRPRNSendCmdEx to hang until I disconnect the printer. The printers LCD displays "Downloading data", than the printer ejects the card and displays "Command error". I've captured the USB traffic and found out that my bitmap data gets never sent to the printer. Instead, the SDK seems to send <ESC> Z <CR>.


I've double checked the bitmap data encoding and don't see any issue. Does anyone have an idea what's going wrong? Could you please provide a more advanced code sample that uses direct printing (that means not using the Spooler) and is build on top of the SDK?


EDIT: Printing with Microsoft Word and Paint.NET works fine.


Best regards,