1. Modify Document Template
    In order to modify/create a document template, you need to browse to the page Admin > Advanced > Modify Document Template.
    Document Template is an xml document that describes which data fields and in what format are sent to printer. PdfDocument is a container element that includes all documents elements such as shapes, barcodes and text fields that will be displayed in pdf documents.
    Here is the content of a sample document template:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Document : pdfengine.xml
    Created on : April 3, 2014
    Author :
    Description:
    Purpose of the document follows.
    -->
    <pdfdocument orientation="P" units="in" pagewidth="4" pageheight="2" title="Package Label 4x2" marginleft="0.1" marginright="0" margintop="0.1" fontname="Arial" fontbold="" fontsize="2">
    <documentelements left="0.15" top="0.10" width="0.05" height=".5" datasourcefield="id" dataprefix="" dataformat=" %08d" type="CODE39" fontsize="2" fontbold="B" fontname="Arial" wrap=""></documentelements>
    <documentelements left="0.12" top=".55" width="1.8" height="0.2" dataprefix="" dataformat="" type="TEXT" fontsize="6" wrap="" value="Tracking No:" fontbold="B"></documentelements>
    <documentelements left="0.65" top=".55" width="2.2" height="0.2" datasourcefield="trackingno" dataprefix="" dataformat="" type="TEXT" fontsize="6" wrap="" value=""></documentelements>
    </pdfdocument>

    Configure a document template
    You can decide what data you want to display on a package label as well as determine how they are going to be formatted. As mentioned above, a document template consists of a pdfdocument element that contains one or more documentelements.
    Properties that you set for a pdfdocument element will be considered as default configuration for all elements in document template. So if you do not set font size for an element, document generator will automatically take values from pdfdocument settings.

    PDFDocument
    In this xml element, you can set general properties for your document as well as default parameters.
    • Orientation: Defines document orientation for package label. Possible values are « P: Portrait» and « Landscape ». Please note that for certain barcode printers, setting this property might not actually work and you need to configure barcode printer’s preferences in Control Panel > Printers and Scanners > { your Barcode Printer } to print in landscape mode.
    • Units: As you need to set dimensions and position of each element on package label, this parameter allows you specify measurement units. Possible values are “in: Inch” and “cm: centimeters”.
    • Pagewidth : Width of page
    • Pageheight : Height of page
    • Title: this property allows you to define a new document template. Since there is no button to add a new document template, if you enter a new name for title property (please do not forget to change xml file name), WTS will automatically create a new document template for you. Once you saved changes, you should refresh the page to see newly created document template.
    • Marginleft, Marginright and Margintop: define page margins for generated pdf document.
    • Fontname, fontbold, fontsize: for a bold font, set value of fontbold property to “B”. Fontname is set to a font name available in your system.
    General properties of DocumentElements
    • For each documentelements object in xml file, it is necessary to provide values for properties “left”, “top”, “width” and “height” to specify documentelements’ positioning in generated pdf report.
    • Allborders: allows you to draw a rectangle around documentelements object.
    • Fontname, fontbold and fontsize: for a bold font, set value of fontbold property to “B”. Fontname is set to a font name available in your system.
    • Wrap
    • Backcolor: you can set background color for your documentelements’ object. White color code is “#FFFFFF” and black color code is #000000.

    DocumentElements (TextField)

    In order to display text on package label, you need to set type to “TEXT” for this documentelements’ object. Property “Value” contains text that will be shown on package label.


    DocumentElements (Datafield)

    You can display package information using this type of DocumentElements by setting its “Type” to “TEXT” and setting “datasourcefield” to its corresponding field. You can find a list of available data fields later in this section.

     

    DocumentElements (Barcode)
    To display a barcode on a package label, you need to set its “Type” to “CODE39” and its “datasourcefield” to its corresponding data field. You can find a list of available data fields later in this section.

    DocumentElements (Shape)

    If you set “Type” property to “SHAPE”, you can draw a line or a rectangle to format package label appearance.

    Draw Line
    To draw a line, you need to set values to “Left”, “Top” and “Width” properties. “Height” property should be set to “0.1”.

    Draw Rectangle
    Settings are the same as drawing line, but “Height” property should be set to the size of rectangle that you wish to be displayed on package label.
  2. How to create a new document template

    Please remember to save the existing document template before creating a new one!
    In order to create a new document template, you need to:
    1) Assign a new file name to new document template
    2) Specify a new name for new document template

    Start by opening a document template and save its content with exact file name with xml extension. (This is a crucial step as it will help you to recover damaged document in case of an error).
  3. Once you have finished creating your new document template, make sure that you have set title property in pdfdocument element to your desired title for new document template.
    <pdfdocument orientation="P" units="in" pagewidth="4" pageheight="2" title="Package Label 4x2" marginleft="0.1" marginright="0" margintop="0.1" fontname="Arial" fontbold="" fontsize="2">
    Select the document template that you have made copy of and copy your new xml document template in the box. Please do not forget to change the name of the xml file!
  4. When you press on “Save Changes”, WTS application will look at title in xml content and file name and since it does not match the selected document template, it will create a new document template. You need to refresh the page by pressing on F5 key to view your new document template in the list.
  5. Configure users with a specific job function to use your customized document template to generate package labels
    You can configure WTS so users with different job function would print package labels with different formats. First visit Admin > System Settings page. In “Package Tracking Settings for {Job Function}”, look for “Package Label Template” where you can select a document template for selected job function.
Date created:
07/31/2018 10:26:28
Last updated:
12/03/2018 15:21:50
Product(range):
WTS Package Tracking
Print