Re: EAN13 barcode

Humberto C

Gracias por tus comentarios.
Steven G. Blank

El viernes, 16 de abril de 2021 4:05:28 p. m. GMT-5, Steven Blank <sgblank@...> escribió:


The easiest and most reliable way I've found to generate UPC and EAN barcodes was to purchase appropriate barcode fonts from IDAutomation (<>), and to use their included, proprietary DLL to encode the data.

Using a Windows True Type Font makes printing barcodes on your Magic forms drop-dead simple.

Regarding encoding, you could certainly "roll your own" algorithms to manage the complex calculations of start, stop, and checksum data, however, IMO, it's just not worth one's valuable time to reinvent that wheel. Calling their DLL is simple via Magic's Invoke UDP operation with the following expression:


This call expects five arguments, which I supply as a string expression and four Magic variables:

'AAL4'  */ The argument string, each letter of which describes one of the following variables. /*
p_Source_String  */ Alpha '255' variable containing the string to be encoded. /*
v_Target_String  */ Alpha '255' variable to receive the encoded string. /*
v_Target_Length */ Numeric 'N10' variable to receive the length of the encoded string returned above. /*
v_Return_Code */ Numeric 'N10' variable to receive the called function's return code. /*

I chose to abstract this functionality in a User Defined Function in the application's Main Program, so I can call it from multiple tasks.

Steven G. Blank
SGBlank Consulting

On 4/16/2021 1:35 PM, Humberto C via wrote:
Hello Group,
Some guidance with this topic, how to generate EAN13 barcodes, with MAGIC?



Join to automatically receive all group messages.