Using XDC Editor, you can specify PDL statements for a
set of predefined sequence names. The sequences are bits of printer
programming languages that are represented as XML. Before you attempt
to modify a sequence, be aware of the associated PDL sequence conventions.
PDL sequences
PDL
sequences are short PDL sequences that Output injects into the PDL
syntax that is sent to the printer at specific points in the print job,
such as at the beginning of a page or a record. Output adds the
PDL sequences to perform events, such as starting a print job, starting
a new document within a print job, or simply drawing a line.
Each
sequence is associated with a name that uniquely identifies the
sequence. XDC Editor lets you modify the sequences that are associated
with predefined names. (See
Predefined variables
.)
Predefined variables
The XDC files include several predefined variables, such
as sequence names and printer-specific values.
Sequence names
The XDC files that are delivered with your installation
contain predefined sequences. If required, you can use XDC Editor
to modify these sequences. The names defined for PostScript and
PCL XDC files differ from the names defined for label printer XDC
files.
This table describes the predefined sequence names
for PostScript and PCL XDC files.
Name
|
PostScript
|
PCL
|
When a sequence is invoked
|
|
Yes
|
Yes
|
To set up the printer for the document.
The sequence is invoked after the
preamble
sequence
but before the
preRecord
sequence. XDC Editor does
not enable editing the preamble sequence.
|
|
Yes
|
Yes
|
To set up the printer after the document.
The sequence is invoked after the
postRecord
sequence
but before the
postamble
sequence.
|
|
Yes
|
Yes
|
To set up the printer before every record.
A
record
is a repeating set of data. Typically, a record
holds the data from a single form instance.
|
|
Yes
|
Yes
|
To set up the printer after every record.
|
|
Yes
|
Yes
|
To set up the printer before every page.
|
|
Yes
|
Yes
|
To set up the printer after every page.
|
|
Yes
|
Yes
|
To set up long-edge duplex. The result of
this setting is to impose each consecutive pair of pages to enable
binding on the long edge.
|
paginationDuplex
ShortEdge
|
Yes
|
Yes
|
To set up short-edge duplex. The result
of this setting is to impose each consecutive pair of pages to enable
binding on the short edge.
|
|
Yes
|
N/A
|
To set up the printer pagination feature,
such as duplex.
|
|
Yes
|
Yes
|
To enable the printer’s staple feature.
|
|
Yes
|
Yes
|
To disable the printer’s staple feature.
|
|
Yes
|
N/A
|
To staple the document.
|
|
Yes
|
Yes
|
To disable the printer’s jog feature.
|
|
Yes
|
Yes
|
To enable the printer’s jog feature.
|
|
Yes
|
N/A
|
To jog the tray.
|
This table describes the predefined sequence
names for Zebra XDC files.
Name
|
When a sequence is invoked
|
|
Not applicable.
|
|
Not applicable.
|
|
To set up the printer at the start of each
page.
|
|
To set up the printer at the end of each
page.
|
|
To specify the name of the instruction prefix
character. Most ZPL commands are prefixed by the caret (^) character,
such as ^A, ^B1, ^B2, and so on.
Some older Zebra printer
models may erroneously interpret the default ^ character as the
second byte of a double-byte Japanese character. This case is the
only one in which you should need to change the default ^ character.
You
can change this character to another character, such as the exclamation
mark (!). The ^ character is substituted with the character you
specify, such as !A, !B1, !B2, and so on.
|
|
To execute control instructions that cause
the printer to take a specific action immediately, such as clearing
the memory or feeding a blank label.
|
|
To specify the number of copies.
|
Use of variables in sequences
A sequence
can use
var
elements that have corresponding XCI
settings. Developers can specify these XCI settings in a process
or by using the Output API. At run time, the Output server substitutes
the variable in the XDC file with the value specified in the equivalent
XCI setting. Examples of variables that map to XCI settings include
those in this table:
Sequence name
|
Variable name
|
Equivalent XCI setting
|
|
|
|
|
|
|
|
|
|
|
|
|
A sequence can use
var
elements to reference
named sequences that are defined earlier in the XDC file or defined
by the PDL. The following example uses the
pageWidth
and
pageHeight
variables:
<var name="pageWidth"/> <var name="pageHeight"/>
A sequence can also reference other sequences by name. Such references
are expressed as an XML segment that defines a
seq
element.
The following example is of a
startDoc
sequence
from ps_plain.xdc:
<seq use="#pa_preamble" />
<seq use="#textEncodings" />
The above sequence references two other sequences (
pa_preamble
and
textEncodings
),
which are defined elsewhere in the XDC file. XDC Editor does not
enable modifications of these sequences or any other sequences that
are not visible in the Sequences tab.
For more examples of sequences, see the XDC files provided with
your installation.
Encoding PCL sequences
PDL commands that are entered for a sequence must conform
to XML conventions. As a result, you must use the
<ESC/>
element
and XML escape sequences to represent characters that have special
meaning in XML. The following table shows the more common escape
sequences.
Character
|
Escape sequence
|
Escape
|
|
Ampersand (&)
|
|
Left angle-bracket (<)
|
|
Right angle-bracket (>)
|
|
Line feed
|
|
Carriage return
|
|
The following example is of a
preDoc
sequence
for a PCL printer. Before this sequence is included in the PCL stream
that is sent to the printer, the escape sequences are replaced by
the characters they represent. The escape characters in this sequence
appear in bold:
<ESC/>%-12345X@PJL RDYMSG DISPLAY="" @PJL ENTER LANGUAGE = PCL <ESC/>&l1T<ESC/>*t600R<ESC/>&u600D<ESC/>&l1X
For more information about escape characters for XML, see the
XML Specification
at
www.w3c.org
.
Modifying sequences
XDC Editor lets you modify the PDL commands that are associated
with predefined sequence names.
-
At the bottom of the XDC Editor panel, click the Sequences
tab.
-
Select the sequence to modify.
-
In the Sequence panel, modify the PDL statements as required.
Use escape sequences to replace characters that cannot appear in
XML documents. For information about escape sequences, see
Encoding PCL sequences
. For information about PDL sequences, see the
corresponding reference documentation.
-
Click Apply.
|
|
|