>I am developing a software and its requirement like bar code prining on a ticket with dot matrix printer.. is it possible ? is there some cheap solution?
Is it possible - yes. I'd recommend buying an existing package for doing this, though - anything you code yourself will be printer-specific, or at least generic printer type specific.
I'd caution you that dot-matrix printers may not deliver adequate print quality on a DMP. This is especially the case with relatively small barcodes, on low-grade paper, and where there's considerable variation in humidity.
I'm not sure where you might look, but there was some PD code written for Clipper a long time ago (look for something called 3OF9.ZIP or something similar on one of the BBS/Internet ftp sites that have PD code for xBASE on them) that had generic code for HP LaserjJt and Epson compatible printers; it used some of the in-printer graphics capabilities to print barcodes in fixed sizes and orientations. I adapted the code a long time ago to produce 3 of 9 barcodes for an HP Laserjet in FPDOS, but I don't have the original code, and never bothered to convert the Epson stuff. The experiments we did using dot matrix printers were completely unacceptable - too slow, and dust or dirt on the print head, or the humidity getting a bit high, or the printer head misadjusted resulted in smudging and lots of errors on reading.
Hallogram (they advetise on UT) used to carry software for FPDOS; you might also check the companies advertising barcode solutions in the various PC trade magazines (the last issue of PC Magazine had a number of vendors advertising barcode solutions around page 230 or so.)