The built-in function, ng:serializationData can help you if you want to print multiple label on a ZPL compatible printer, that are all identical apart from a number, which is increased for each label.
You can use this to reduce the size of the print data stream and increase print performance.
Prerequisites/limitations: This function only works for ZPL output. It is also only supported for a single page output, that is printed in multiple copies.
The ng:serializationData can e.g. be called with this command: ng:serializationData('00001','3','y') and here are descriptions of the 3 parameters:
First parameter: Starting value
Second parameter: Increment (up to 12 digits).
Third parameter: Keep leading zeroes
Examples of use:
ng:serializationData('00001','3','y') = Number on the labels will be 00001, 00004, 00007…
ng:serializationData('00001','3','n') = Number on the labels will be 1,4,7…
ng:serializationData('5','1','n') = Number on the labels will be 5,6,7…
Here you can find an example of printing three labels with the numbers:
The built-in function, ng:serializationData can help you if you want to print multiple label on a ZPL compatible printer, that are all identical apart from a number, which is increased for each label.
Here you can find an example of printing three labels with the numbers:
This prints out the number: 00001 and prepares the printer to increment the value with 1 for each copy.
If this template is used in a workflow, which prints multiple copies like below, then the output in this case will be 3 labels with the values 00001, 00002 and 00003:
The advantage is, that only a single page element is sent to the printer, so the print speed will be as fast as the printer can print at all – with the selected print speed.
Related Articles
ng:decrypt
The built-in function, ng:decrypt is linked with the encryption functions: ng:encrypt and the workflow component, Set secure workflow variable. The function, ng:decrypt() can decrypt contents, that was previously encrypted with these functions. The ...
ng:resourceExist
This function checks, if a resource in InterFormNG2 exists or not. The function returns a boolean: true or false. The ng:resourceExist Xpath function has this format: ng:resourceExist(resource,path) where: resource Resource is the type of resource in ...
ng:minimum
InterFormNG2 includes the special built-in XPath function, ng:minimum. This function returns the smallest value of two numeric arguments. The function only accepts two numeric arguments - no more and no less. Examples: ng:minimum(-14,2) returns: -14 ...
ng:spaceConcat
The built-in function, ng:spaceConcat(), helps concatenate two strings with a space character automatically inserted between them. Here is an example: This XPath expression: ng:spaceConcat('First name:', 'Jon') outputs this string: First name: Jon ...
ng:base64
The built-in function, ng:base64() converts a string (text) into a base64 based string. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed. This function is ...