ZPL ^DN command?

104 views Asked by At

I have a ZPL file which contains an image represented in ASCII data.

^GFA,...parameters and ascii data...
     ...
00000000000000000000000000000000000000
00000000000000000000000000000000000000
^DN
^XZ

However I cannot find anything about the ^DN command. Starting with a caret.

The regular command is ~DN (starting with a tilde).

Is this a ZPL dialect, brand specific extension or something undocumented?

2

There are 2 answers

0
hc_dev On BEST ANSWER

To extend on SyndRain's fast first answer:

First you have the ^GFA command, which specifies the download (^GF) of "ASCII hexadecimal" compressed (A) graphic field data.

The data is interpreted in a special way, where caret or tilde are abort-signals:

ASCII hexadecimal data: 00 to FF A string of ASCII hexadecimal numbers, two digits per image byte. CR and LF can be inserted as needed for readability. The number of two-digit number pairs must match the above count. Any numbers sent after count is satisfied are ignored. A comma in the data pads the current line with 00 (white space), minimizing the data sent. ~DN or any caret or tilde character prematurely aborts the download.

See: ZPL 2 Command Reference, page 211

So, as already commented by others, the ^DN you encounter is probably an intended abort using not entirely correct syntax (~DN would be more correct).

0
SyndRain On

It is the Abort Download Graphic command:

Description: After decoding and printing the number of bytes in parameter t of the ~DG command, the printer returns to normal Print Mode. Graphics Mode can be aborted and normal printer operation resumed by using the ~DN command.

Comments: If you need to stop a graphic from downloading, you should abort the transmission from the host device. To clear the ~DG command, however, you must send a ~DN command.


Edit: I miss-read OP's question so this only answered what is ~DN, but for the completeness of hcdev's answer, I'll keep this answer here.