Salesforce

Capturing Printer Communication to Stream Log Using ZDesigner Windows Driver Version 8

« Go Back

Information

 
Issue / QuestionUsing the ZDesigner Windows driver version 8 stream logging feature to capture print code used for print and response from the printer.
Applicable ToZDesigner Windows driver version 8
Windows versions that are supported by the driver
ZebraDesigner V3
Resolution / Answer
Stream logging allows you to keep track of all data exchanges between the driver and the printer. When enabled, the driver logs all outbound and inbound communication with the printer. The driver stores print streams (label information) separately from the bidirectional communication (control messages). Every label and every message are saved in a unique file.

The feature is disabled by default and can be enabled for troubleshooting purposes.
 
NOTE This feature is from ZDesigner 8.x driver and not available in ZDesigner 5.x driver.

To enable stream log (Windows 10), follow the instructions provided below:

  1.  Open Printer properties of the printer from Start > Settings > Devices > Printers and Scanners > Manage.
  2. On Support tab, check Enable in Stream logging. Output Directory can be changed.
  3. If the Enable check is grayed out, enable bidirectional support, and apply from the Ports tab.
NOTE Make sure to disable logging, when you are done with troubleshooting. On busy systems, logging can increase processor usage and disk load.


Viewing log files

When an application prints using the driver, the log files are created in a specified folder. By default, log files are created in the folder below:

C:\Users\<Login User>\Documents\Zebra\Stream Logging

Each log file (except counter.tmp) can be opened by text editor such as Notepad, Visual Studio Code and so forth.

Files created:

main.log

Single log file to show driver behavior. Lines start from [hh:mm:ss.fff] timestamp, however date is not logged. Example as below.
[13:51:57:152] <Start: WriteToPort>
[13:51:57:152] dwSpoolerBufferSize = 6
[13:51:57:152] WriteToPort2 result = 1
[13:51:57:152] Bytes taken from spooler = 6
[13:51:57:152] <End>
[13:51:57:152] <Start: EndDocument>
[13:51:57:152] Communication data:  = C:\Users\User1\Documents\Zebra\Stream Logging\\ZDesigner QLn420 (ZPL)\CommunicationData\135157152 - TO.tmp
[13:51:57:153] Communication data length (to printer):  = 5
[13:51:57:394] Communication data:  = C:\Users\User1\Documents\Zebra\Stream Logging\\ZDesigner QLn420 (ZPL)\CommunicationData\135157394 - FROM.tmp
[13:51:57:395] Communication data length (from printer):  = 51
[13:51:57:812] Communication data:  = C:\Users\User1\Documents\Zebra\Stream Logging\\ZDesigner QLn420 (ZPL)\CommunicationData\135157812 - FROM.tmp
[13:51:57:812] Communication data length (from printer):  = 93
[13:51:57:878] EndDocPort

CommunicationData\hhmmssfff – TO.tmp (hhmmssfff is timestamp)
Captured print stream from driver to printer. Example as below.
^XA
^MMT
^PW831
^LL240
^LS0
^FT31,67^A0N,42,43^FH\^CI28^FDZEBRA^FS^CI27
^BY2,3,65^FT31,157^BCN,,Y,N
^FH\^FD>:CAPTURE THE EDGE^FS
^FO11,12^GB807,214,4^FS
^PQ2,0,1,Y
^XZ
CommunicationData\hhmmssfff – FROM.tmp (hhmmssfff is timestamp)
Captured response from printer to the driver. Example as below:
   ERRORS:         0 00000000 00000000      
   WARNINGS:       0 00000000 00000000      

PrintStreams\nnnnnnnnnnn.prn (nnnnnnnnnnn is sequence number from 00000000000)
Captured print job from Driver to Printer. Usually consisted of one or several TO.tmp file's contents.

PrintStreams\counter.tmp
Binary file to record the number of print jobs sent since enable the logging.

Helpful Information:

Link-OS printers have a similar on-device feature “input.capture” which enable to capture received data and save to printer memory: Capturing and viewing data sent to a Zebra Link OS compatible printer.

 
URL NameCapturing-printer-communication-to-stream-log-using-ZDesigner-Windows-driver-version-8
TitleCapturing Printer Communication to Stream Log Using ZDesigner Windows Driver Version 8

Powered by