User guide
18 Creating Card Formats
• OpenCard uses the instructions in the card format to merge the data stream text, images,
and magnetic stripe data into a card to be printed, similar to a mail merge. As in the mail
merge process, the card format contains text and image named variables that OpenCard
uses to map to the corresponding items in the data stream.
The Card Format as an SVG Document
The basis of the SD/CD Series card format is an XML-based document format, Scalable Vector
Graphics, or SVG. The World Wide Web Consortium publishes the definition of the SVG format.
To create an OpenCard card format, the SVG standard defines 1) the basic structure of the card
format, and 2) the majority of the attributes that define image and text items.
The SVG card format also uses Datacard-specific conventions and extensions compatible with
the OpenCard data stream standard, affording access to the full range of capabilities available in
SD/CD series printers. For information about the OpenCard data stream standard, refer to the
Data Formatting Guide.
Card Format Structure and Conventions
The SVG markup you use to create an OpenCard card format describes the relationships
between the elements that make up the card format as layers. Each layer is demarcated with a
<g> at the beginning and a </g> at the end, as shown in the following example:
Card Side
Layer
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1013px" height="638px"
xmlns="http://www.w3.org/2000/svg">
<g id="CARD_FRONT">
<g id="GRAPHIC_MONOCHROME">
<g><text id="LINE1" fill="black" x="75" y="300" font-
size="12pt" font-weight="bold" font-family="DejaVu
Serif" datacard:staticElement="true">Name:</text></g>
</g>
</g>
<g id="CARD_BACK">
<g id="MAGSTRIPE">
<g><text id="ISO1" datacard:trackType="ISO1"/></g>
</g>
</g>
</svg>
Personalization
Operation Layer
XML Header
The SVG document must begin
with <svg> and end with </svg>
Text and Image ID Layer
Card Side
Layer
Personalization
Operation Layer