There are two ways of doing this the one is complex as well as non generic such as once hard coded its difficult to change without again building the project
First Way
In this way you have to override onDraw() function for printing so that you have to calculate the location and size of each string to be printed on receipt its very complex and very tricky and for each minor change you have to change all calculations again
Second Way
You have to create your receipt in HTML ,CSS very easy and efficient as well as Generic for future you will just change the HTML template and your app will adopt your new receipt without the need of building application again
so what you need to do is
Create Html code leaving the value fields with some replaceable character combination i.e
<h3>Total Bill : %bill%</h3>
in your program you will read the file and replace %bill% with the actual value
after doing this procedure you will finally get an HTML code of receipt
then create a WebBrowser instance like this
WebBrowser browser = new WebBrowser();
browser.DocumentCompleted +=new WebBrowserDocumentCompletedEventHandler(WebBrowser_DocumentCompleted);
browser.DocumentText = "your generated html code";
after this create an event of WebBrowser_DocumentCompleted like that
public void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser wb = (WebBrowser)sender;
//set here your thermal printer by default if it is not already
wb.Print();
}
You are done!