Skip to content

DataSplice Support Website

Sections
Personal tools
You are here: Home » Product Manuals DataSplice 3.0 » DataSplice Barcode Printing Plug-in Manual » Configuring Barcode Label Templates

Configuring Barcode Label Templates

Label template files control the actual formatting information for all of the barcode labels. It is possible to create as many distinct label template files as desired, each having its own set of formatting values and options. Label template files should be stored in the C:\Program Files\DataSplice3\Barcode Label Templates directory (or other installation path if a different one was chosen during installation). A default set of label template files is included in this directory upon installation of the plug-in. The name given to the label template file, such as InventoryLabels.xml, is then referenced in the Administration Client by the same name without the file extenstion, such as InventoryLabels. For additional information about referencing label templates in the Administration Client, please see the related Administration Client areas section of this manual.

Editing the Label Template Files

As there are a few label template files included with the installation by default, it is generally advisable to simply alter one or more of the existing files to suit the desired formatting needs. It is possible, however, to create new label template files from scratch. Keep in mind that they must have the required tag information to be interpreted properly. For complete formatting options supported by your printer, please refer to the reference documentation provided by the manufacturer.

The Label Tag

The <label> tag serves as the main container tag for the template file. Within this tag are the other important tags such as <text>, <barcode>, and <data>, as described in the following sections.

As desired, the <label> tag can contain different attributes that affect the formatting behavior of the template:

  • Contrast (PL4 printers only) - This adjusts the darkness of the label being printed. Possible values are 0 to 3, with 0 being the lightest and 3 being the darkest.
  • Format (PL4 printers only) - This tells the printer to either form feed the label to the next label when done printing or not. Form feeds to the next label when done printing, while Journal does not. The default is Form.
  • Location - The X (horizontal) and Y (vertical) positioning of the label.
  • Width (PL4 printers only) - This tells the printer how wide the paper is or how wide you want the label to possibly be (in dots). There are roughly 200 dots per inch.
  • Units (DPL printers only) - DPL printers allow the usage of this attribute in the <label> tag to specify the unit of measure for the printer to use for the measurement-related attributes. Acceptable values are:
    • Inches - Measured in tenths of an inch. This is the default if not specified.
    • Metric - Measured in hundredths of a millimeter.

The Text Tag

The template file can contain <text> tags that define the formatting of the text to be printed on the label. Common attributes that can be set for the <text> tag include the following:

  • Font - The type of font to use. See documentation specific to your printer language for valid font values.

    Note: When the Font attribute is set equal to 9 for a DPL printer, this will utilize "smooth fonts". When smooth fonts are used, it is necessary to define a FontSize attribute, otherwise the driver will throw an exception. This is required because Font=9 tells the printer to use smooth fonts and the FontSize attribute tells the printer which smooth font to use. For a complete list of fonts and smooth fonts, please see the DPL printer documentation

  • FontHeightMult (DPL printers only) - Scales the height of the font. For example, if a font is normally 6 dots in height, and you set the FontHeightMult attribute equal to 2, the resulting font would be 12 dots in height.
  • FontWidthMult (DPL printers only) - Scales the width of the font.
  • Justify (PL4 printers only) - This attribute can be used to justify the text. Acceptable values are CENTER, LEFT, or RIGHT.
  • Location - The X (horizontal) and Y (vertical) positioning of the text item.

    Note: For a DPL printer, this is slightly different. This specifies the lower-left corner to start printing the data. This is interesting when you want multiple lines of text that is word-wrapped. The text will be printed up from the specified location.

    Example:

                            this text will span
                            more than one line 
                            <- starting here
    

    In the text above, the arrow on the last line points to the point that the Location attribute specifies.

  • Mag (PL4 printers only) - This attribute is used to scale or magnify the set font. It accepts values in the form of x,y. Values can be in the range of 1-16.
  • MaxWrapLines - Specifies the maximum allowed number of lines that a text item is allowed to wrap (such as 1 = one line of text, 2 = two lines of text, etc.). If the text goes further than the MaxWrapLines allows, it will get truncated. There is no support for wrapping when using smooth fonts.
  • Orientation (DPL printers only) - This is responsible for rotating the data to be printed. The values can be between 1 and 4, where each number is an increment of 90 degrees.
  • PointSize - The desired point size for the text item. This will control font size on IPL printers.
  • Units - This specifies what units the printer is to use for the measurement-related attributes such as Location, Width, etc.
    • Valid attribute values for a PL4 printer:
      • IN
      • CM
      • MM
      • DOT - This is the default unit.
  • Width - Specifies the allowed width of text items.

The Barcode Tag

Like the <text> tag, the <barcode> tag contains formatting information. The <barcode> tag defines the formatting of the barcode itself that will be printed on the label. Common attributes that can be set for the <barcode> tag include the following:

  • Height - Height of the barcode in dots.
  • LabelAboveBarcode - Specifies whether or not to print the text value above (True) or below (False) the barcode.
  • Location - The X (horizontal) and Y (vertical) positioning of the barcode.
  • NarrowWidth - The narrow bar width of the barcode (1 through 10).
  • Offset (PL4 printers only) - This defines how far to place the label from the barcode.
  • Orientation (DPL printers only) - This is responsible for rotating the data to be printed. The values can be between 1 and 4, where each number is an increment of 90 degrees.
  • PrintLabel - Specifies whether or not the barcode should display the human-readable text value (True or False).
  • Symbology - Type of barcode symbology (such as Code11, Code39, Code39CheckDigit, Code49, Code128Auto, Code128A, Code128B, Code128C, Code128UCCC, Codabar, EAN8, EAN13, Interleaved2of5, UPCA, UPCE, MSI1, or MSI3).
  • Units - This specifies what units the printer is to use for the measurement-related attributes such as Location, Height, NarrowWidth, WideWidth, Width, etc.
    • Valid attribute values for a PL4 printer:
      • IN
      • CM
      • MM
      • DOT - This is the default unit.
  • WideWidth - The wide bar width of the barcode (2 to 3 times the narrow width).

The Data Tag

In addition to the attributes mentioned above for both the <text> and <barcode> tags, there is a <data> tag that can be included within both of those tags. The <data> tag specifies the actual information that is going to be printed on the label. This can be a literal value, such as WINSTON, or a DataSplice attribute, such as ${EMPLOYEE_NAME}.

Examples

The following examples are intended for guidance purposes. For best results, the exact label template file that should be used depends on the names of the fields in your view, the attributes allowed by your printer driver, as well as the physical size of the label being used.

General Example:
    <?xml version="1.0" encoding="utf-8" ?>

    <label Location="15,15">

        <text Font="D" Location="20,15">
            <data>${Item Num} ${Bin} UOM: ${Issue Unit}</data>
        </text>

        <text Font="C" Location="20,50" Width="300" MaxWrapLines="4">
            <data>${Desc}</data>
        </text>

        <barcode Location="20,110" Symbology="Code39" NarrowWidth="4" WideWidth="9" Height="50" PrintLabel="False" LabelAboveBarcode="False">
            <data>${Item Num}</data>
        </barcode>

    </label>

DPL Example:
    <?xml version="1.0" encoding="utf-8" ?>

    <label Location="25,12" Units="Metric">

        <text Font="2" Location="25,100" DPI="300" FontWidthMult="1" FontHeightMult="4" MaxWrapLines="6" Width="100">
            <data>This should wrap over several lines</data>
        </text>

        <barcode Location="25,200" Symbology="Code39" NarrowWidth="3" WideWidth="5" Height="100" PrintLabel="True">
            <data>123456</data>
        </barcode>

    </label>

PL4 Example:
    <?xml version="1.0" encoding="utf-8" ?>

    <!-- The Location's X value is the offset (in dots) on the paper for the label to appear. -->
    <!-- The Location's Y value is the maximum height of the label (in dots).
         300 dots is roughly an inch and a half. -->

    <label Location="25,300" Contrast="2" Format="Form" Width="800">

        <text Location="25,100" Font="2" Size="3">
            <data>Testing the PL4 printer driver</data>
        </text>

        <!-- If PrintLabel is True, then Font, Size, and Offset pertain to the label. -->

        <barcode Location="25,180" Symbology="Code39" NarrowWidth="3" 
            Ratio="1" Height="100" PrintLabel="True" Font="2" Size="1" Offset="5">
            <data>123456</data>
        </barcode>

    </label>

 


Last modified 2006-04-21 08:54 AM
 

Powered by Plone

This site conforms to the following standards: