Barcode Generator in Dynamo, IronPython or as a ZeroTouch node

Hello.

Has anyone attempted to create a Barcode Generator similarly to the QR Code generator?

I am asking since PowerBI does not allow using QR codes for report filtering on elements, but it does allow using barcodes.

Any reference to an IronPython library, a zerotouch node or a package would be really appreciated :smiley:

Thanks, Adam

Hello
here an example with a free library

import sys
import clr
import System

clr.AddReference('System.Drawing')
from System.Drawing import *

clr.AddReferenceToFileAndPath(r'C:\Users\poupincyril\Downloads\freespire.barcode.2.3.0\lib\net40\Spire.Barcode.dll')

import Spire.Barcode
from Spire.Barcode import *

path = IN[0]
fullPathPng = path + "\\EAN-14.png"

settings = BarcodeSettings()
settings.Type = BarCodeType.EAN14
settings.Data = "123456789"
settings.UseChecksum = CheckSumMode.ForceEnable
settings.ShowTextOnBottom = True
settings.TextAlignment = StringAlignment.Center
generator = BarCodeGenerator(settings)
image = generator.GenerateImage()
image.Save(fullPathPng, System.Drawing.Imaging.ImageFormat.Png)

OUT = fullPathPng
9 Likes