User guide

SD/CD Series Card Printers OpenCard Data Format Guide 33
Use the datacard:format attribute to insert characters when
The data stream does not contain all of the data characters that must print on the card.
The characters missing from the data stream are placed in the same place in the final data.
For example, use the datacard:format attribute if the data stream supplies an expiration date as
“1016” but the printed card must use the date formatted as “10/16”. In this case, use the
following datacard:format attribute:
datacard:format=”99/99”
This inserts the ‘/’ character and verifies that the four data stream characters are numeric.
datacard:remove Attribute
The values accepted are whole number representations only. The default is zero.
If a datacard:remove attribute is defined, then the value of this attribute is used to cut that many
data characters from the front of the data stream item that corresponds with the element’s ID.
Text Element Layer Example
datacard:format Example #2
datacard:remove Example
OpenCard
data stream
<1234567890>
Card format
<g><text id="LINE1" fill="black" x="375" y="300" datacard:remove=”3”
font-size="12pt"font-family="DejaVu Serif"/></g>
Data
merged into
card format
<g><text id="LINE1" fill="black" x="375" y="300" datacard:remove=”3”
font-size="12pt"font-family="DejaVu Serif">4567890</text></g>
Text Element Layer Example
This example shows a GRAPHIC_MONOCHROME layer containing text element layers. The
data merged into the card format becomes the instructions for rendering the
monochrome text and graphics data.