My requirement is that I need to print an invoice, it can contain 10 lines or it can contain 20 lines. Each item must be in one account.
For example, if you go to any supermarket, if you buy 3 items, you can get a small account size. If you buy 30 items, you can get a large invoice size. I want to implement the same in my vb.NET application.
Precisely I need to increase the page length of the printer through the program according to the nature of the account.
I am using a dot matrix printer with graphical print mode. A.
What I tried:
At the moment, I created a text file and printed it using the command line using the following command
Type Printfile.txt > prn
But the problem is that I can not format my text file with a different font, weight or size, since I write it as a text file (notepad).
I am using a streamwriter to write files from VB.NET, and at the moment I am trying to format it in text files.
I want to format some words so that they are highlighted in bold or italics and change the font size, but I can not do this, because the formatting is text files.
Below is the format:
Store Name
Store Address
----------------------------------------
Gift Receipt
Transaction #: 105
Date: 11/10/2009 Time: 6:10:10
Cashier: 2 Register: 5
----------------------------------------
Item Description Quantity
----------------------------------------
567577 xyz 2
687687 abc 4
– – – – –
----------------------------------------
Net Amount : 6
Thank You for shopping
XYZ StoreName
We hope you’ll come back soon!
source
share