ng:serializationBarcode

ng:serializationBarcode

The built-in function, ng:serializationBarcode can help you if you want to print multiple labels on a ZPL compatible printer, that are all identical apart from a barcode with contents, which is increased/descreased 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. This function should be the main XPath function used in a barcode element. If you want to use similar functionality for a text element, then you should use the ng:serializationData function. This also means that ^FD values setting GS1 codes, codesets and other "inside FD" values must be set in the text. Settings for GS1 codes, codesets and similar settings on the barcode element in the designer are ignored when using ng:serializationBarcode.

The graphics barcode failover for large barcodes is also disabled when using ng:serializationBarcode, meaning that the Zebra printers rule for maximum module width has to be followed. 
There might be more limitations (like checksums etc.) and we recommend thorough testing before going into production.


The function injects the ^SF serilization field into the barcode in ZPL. The field will inject the values directly, which means we strongly recommend reading the ^SF section in the 
Zebra Programming Guide. At writing time available at https://www.zebra.com/content/dam/support-dam/en/documentation/unrestricted/guide/software/zpl-zbi2-pg-en.pdf on page 334
The functionality also depends on the firmware of the printer, so you need to test this on a printer with the same firmware if you want to be 100% sure, that it works.

The ng:serializationBarcode can e.g. be called with this command: ng:serializationBarcode(text, mask, incrementString) and here are descriptions of the 3 parameters:

 

First parameter: Text

  • The text with the increment(s) to be written in the barcode. (E.g. item-001)

Second parameter: Mask

  • How the increment is working. (E.g. %%%%%ddd).
    The mask is written as:
    %: Ignore
    d: Decimal number
    h: Hex
    o: Octal
    a: Alphabetic a-z
    n: Alphanumeric 0-9, a-z

Third parameter: IncrementString

  • The increment to use on each label. (e.g. 1)
    %: Ignore
    0-9: number
    a-z: Counts alphabetic as a=0, b=1.. in increments


Barcode notes and implementations

The barcode codeset will always be AUTO.

GS1 codes etc. must be written as ZPL. NG2 doesn't handle GS1 control chars when using serialization.

Checksum calculation and extended character set are not supported.

Only 12 digit barcodes supported (with checksum digit 13 as auto)

Only 7 digit barcodes supported (with checksum digit 8 as auto)

Checksum supported for both off and ADD mode.

Supported

Checksum mode add and ignore supported

Check digit is Auto.

Serialization works, but might act a bit strange due to UPC_A to UPC_E conversion in printer

Works

Works, but checksum digit is added

The following barcodes are currently not supported for serialization in InterFormNG2:
EAN128 and GS1-128 (Both are subsets of code128, use these instead)

    • Related Articles

    • ng:serializationData

      The built-in function, ng:serializationData can help you if you want to print multiple labels on a ZPL compatible printer, that are all identical apart from a number, which is increased/descreased for each label. You can use this to reduce the size ...
    • 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: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: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 ...
    • 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 ...