Product Logo

CNS Barcode

Scan and Generate Barcodes




This function will take the data you provide it and generate a barcode image in PNG, EPS, or SVG format.

Return TypeContainer
FormatCNSBC_Generate ( Type ; Data ; Format ; DataMode )
Required Parameters

This specifies the type of barcode to generate. Valid values are “Codabar”, “Code39”, “Code39+”, “Code93”, “Code128”, “Databar14”, “Databar14Stacked”, “DataMatrix”, “EAN”, “EAN14”, “EAN128”, “HIBCDataMatrix”, “Interleaved2of5”, “ISBN”, “USPS OneCode”, “PDF417”, “Postnet”, “QRCode”, “UPCA”, or “UPCE”.


This is the data to encode into the barcode. If you specify a Number field, the plug-in will auto-format it with four decimal places. However, if the fractional part is zero, it will be removed leaving only the whole number. If you need any other formatting for Numbers, you will need to convert it to text within FileMaker before sending to this function.

Optional Parameters

The output Format of the Barcode Image. Valid values are “PNG” (the default), “EPS”, or “SVG”.


The format the data is interpretted as when generating the barcode. Valid values are “Unicode” [the default], “Binary”, or “GS1”.

Example 1

This generates a QR Code with an embedded URL to the CNS Plug-ins website.

CNSBC_Generate( "QRCode" ; "" )
Example 2

This generates a UPC A barcode.

CNSBC_Generate( "UPCA" ; "03506152005" )
Example 3

This generates an ISBN barcode in the EPS format (a vector format that can be cleanly resized).

CNSBC_Generate( "ISBN" ; "9781595544346" ; "EPS" )