A receipt printer can not only print receipts. It can print barcodes too!
The following article shows you how to print barcode labels with your receipt printer.
You can also find a list of ESC/POS Commands here:
Quick Reference: ESC/POS Commands
The place for php-gtk2 sample codes