Barcode Printing code share

I am trying to print barcode for my item label and came across this topic:

Link

But no one has posted any code on the topic. I’m wondering if anyone can share the code.

Maybe this link would be useful