Hi ,
It looks like the ZPL printer configuration commands my WPF app is sending to a Zebra KR403 are ignored when the same app is printing a document using the Windows PrintQueue of the Zebra KR403. Note that I am not using the SDK to print my documents that are produced from XAML code.
I need to configure the KR403 printer in Kiosk mode, using some parameters such as no presenter loop and to use the black mark sensor to cut the paper at appropriate location. For this, I use ZPL commands such as ^MMK, ^KV0,9,0,0,0 , ^MNM,10 .
To send these ZPL commands from my WPF app, I am using the well known Windows Win32 API OpenPrinter(), StartDocPrinter(), StartPagePrinter(), WritePrinter()... I verified these parameters are received by the KR403 by sending a Printer Configuration ZPL command, ~WC, from my WPF app. The resulting printed label does take in account the configured black mark.
Then , the same Windows WPF application is using the std Windows PrintQueue to print to a Zebra KR403. I am able to print XPS formatted documents using this code:
System.Windows.Documents.FixedDocument myFixedDocument = some FixedDocument instance produced by my app ... ;
var writer = PrintQueue.CreateXpsDocumentWriter( theZebraPrintQueue );
writer.WriteAsync( myFixedDocument );
The documented is printed by the KR403. However, all the Kiosk mode configuration seems to be ignored : paper is not cut on black mark, the printer uses a presenter loop.
Any idea why the ZPL config commands are ignored when printing from the Windows PrintQueue of the KR403 ?
Thanks !
Alain
1 Replies
Hi Alain, The Windows PrintQueue is using the Windows driver you have set up for the KR403. The driver settings are overriding the settings you have configured. First, please make sure you have installed the ZebraDesigner driver for the printer as otherwise it may be missing some of the correct settings you want to use. Then you will want to set up the driver with the correct settings. That should fix the problem. Otherwise you will have to use ZPL entirely and the Win32 APIs to bypass the driver.