When printing a barcode it's likely that you would print it on a standard label size.
As such, it might be useful to have a drop down that contains standard label sizes that a user could select and generate a barcode of that size.