This depends on which receipt printer you use. One of the ones that does a good job of this is the Star TSP143. The printer comes with the software built into the driver that will allow you to download logos for the top of the receipt and print coupons for the bottom. The coupons can even be rotated and can print out based on key words found on the receipt.
To find out more about how this is done, click the following link:
http://www.futureprnt.com/en/the_retailer