Editing an existing label format
- Select Label Management from the Administration menu.
- Click the Label Format tab.
- Click Edit.
- Create a backup copy of the existing label configuration file and save in a separate file for future reference.
-
Identify the printer language attribute.
- Use the Printer management user interface that is deployed with MPC or RAD.
-
Search for one of the printers you will be printing
to and write down the language field of that printer.
The language specification provides a mapping between the printer and the label <format> section.
-
Identify the section of the label format you want to customize.
- Consult the Constraint Definitions section to find the available data elements for the label you wish to customize.
-
Search for the class name of the label you wish to
customize through the text file. Once you find it, identify the format
sections that apply to the group or groups of printers you are customizing
this label for. In most cases, the printer language will be ZPL2.
For example the Parform Item label section is shown as:
<label> <classname>com.lawson.mscm.mpc.label.ParformItemLabel</classname> <format language="ZPL2"> --zpl + data -- info </format> </label>
The format sections of the configuration file specify and determine the exact layout of the label when it is printed. The entire format section is pieced together with printer commands which all detail how text should be formatted and also the point of origin.
Here is an example that will be used for these sections.
<lang>^FO0,15^Ab,,13^CI13^FH_^FD</lang><data constraint="4,3">getItemDescription</data><lang>^FS
-
<lang> tags
The <lang> tags are where the printer language commands are specified. The example is ZPL2 specific.
-
<data> tags
The <data> tags are where the label field data is specified. When printing an actual label the label printing framework substitutes the value of the field into the printer format string. It is at this point that the entire label command is sent to the printer. In this example, the label printing framework will substitute in the item description.
-
Constraint attribute of <data> tag
An example of this is:
<data constraint="1,2">getItemDescription</data>
This instructs the label printing framework to process the getItemDescription substitution and then pass the result through the constraints defined at the bottom of the configuration file with ids 1 and 2. Constraints are useful for limiting the size of the text printed to the label, padding the data with a fixed character, and or escaping special characters which can not be handled by the printer language and printer. See Constraints section.
-
Field origin – ^FO (ZPL2 specific)
This specifies the x,y offset and start point for the entire field (ZPL2 specific). While editing your label layout, you will be changing this field to adjust the positioning of a field. Field origin is in dpi.
-
Field separator – ^FS (ZPL2 specific)
This is a signal to the printer that it has encountered the end of a field (ZPL2 specific).
-
Field Data - ^FD (ZPL2 specific)
This indicates to the printer that user data is dsiplayed next and to not interpret the information as printer language (ZPL2 specific).
-
-
Using the Label Field Definition section, identify
the fields that you wish to add, remove, or modify on the label in
question.
To add a field, identify the field you wish to print from the label field definition section. The simplest and least error- prone method is to copy an existing line from the format section of the label you are working with and paste it into the same format section. So what was:
<lang>^XA^LH30,0 ^FO85,35^BCn,100,N,N,N^CI13^FH_^FDPF:</lang><data constraint="3">getLocCode</data><lang>^FS ^FO50,150^Ab,,13^CI13^FH_^FDPF:</lang><data constraint="3">getLocName</data><lang>^FS ^PQ1 ^XZ</lang>
becomes:
<lang>^XA^LH30,0 ^FO85,35^BCn,100,N,N,N^CI13^FH_^FDPF:</lang><data constraint="3">getLocCode</data><lang>^FS ^FO50,150^Ab,,13^CI13^FH_^FDPF:</lang><data constraint="3">getLocName</data><lang>^FS ^FO100,150^Ab,,13^CI13^FH_^FDPF:</lang><data constraint="3">getLocId</data><lang>^FS ^PQ1 ^XZ</lang>
- Use the printer manufacturer’s language programming guide (ZPL2, IPL) to identify the printing language string necessary to achieve the formatting.
- Place the string in the lang tag preceding the data tag you wish to format.
- Click Save.
- Print the label using the appropriate label printing module in MSCM.