In general, drawing a bar code on your screen and asking a printer to generate and print a bar code are two different things. The printers have their own coding schemes for different types of bar codes.
P.S. I suggest searching this board for 'ESC/POS', a common print stream encoding standard. My FAQ needs dead branch pruning.