With PEAR::Image_Barcode2 class you can create a barcode representation of a given string. This class uses GD function because this the generated graphic can be any of GD supported image types.