Copy link to clipboard
Copied
Hello,
I need to create a code 39 barcode on a PDF document. It will be pulling data from a number field we manually enter data into. Let's call that field "ID".
I have the barcode font installed - however I can't figure out how to automatically append the data source number and wrape it with the * required in front and behind of the number in the barcode field "BARCODE".
So, ultimately I wish to type 123 into ID field and have barcode field pull this and wrap it to read *123* so it will scan correctly.
Copy link to clipboard
Copied
You can use this calculation script where "Barcode" is name of field
// Get the value of the field
var v = getField("Barcode").valueAsString;
// Add leading/trailing asterisks if not blank
event.value = v ? "*" + v + "*" : "";
Copy link to clipboard
Copied
My mistake, Code 39 is a 1d barcode. Not subject to the same rules as the 2d barcode field.
Copy link to clipboard
Copied
Code 39 barcode does not require a check sum or correction digit, but does require a start and end code, which is the asterik in most 39 barcode fonts.