How do I print a string as a barcode in a v14 Purchase Invoice print format?

Can this be done with ERPNext/Frappe directly or do I need to make a custom solution?