The barcode printing from an EMDI form is based on JsBarcode.

However, since the EMDI variables usually end up with gaps that change the password, downloaded the customized file: JsBarcode.all.min.js (it trims  the barcode before it produces it). This file is copied to the forms folder.

At the top of the form that will include our barcode, we put the code inside the head tag:

Where we want to put the barcode:

In this example, we use the content of the relevant document inside our document to produce the barcode.