"A few times I have needed to implement routines that output Adobe PostScript for the purpose of printing barcodes in several different languages. Recently this has provoked me to cook up the following routine that implements the printing of barcodes entirely within level 2 PostScript. This means that the entire process of converting the input string into the printed output is performed by the printer itself, thus avoiding the need to reimplement the barcode generation process whenever your language needs change."
more on http://www.terryburton.co.uk/barcodewriter/index.html