0

Any one please help me. i done a little project using thermal printer. Now my Tl ask me to convert it to Dot Matrix printer. Can u send any sample code for this...? waiting 4 reply
thank u..


with love
guru

6
Contributors
9
Replies
20
Views
9 Years
Discussion Span
Last Post by Mike Askew
0

its a window application... already installed drivers n all.. i want sample coding to get and print the output of my project.

0

is the same coding will support both thermal and dot matrix printer.isn't it? I dont have dot matrix printer now.... but want to do it for dot matrix

0

The whole purpose of drivers for windows was so that you and everyone else dont have to worry about the printer on the other end.

0
public partial class Form1 : Form
    {
        string str;
        Font myFont = new Font("Arial", 10); 
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            readTxt();
        }

        public void readTxt()
        {

            using (StreamReader sr = new StreamReader("test.txt"))
            {
                str = sr.ReadToEnd();

            }

        }
        private void button1_Click(object sender, EventArgs e)
        {
            printDocument1.Print();
        }

        private void button2_Click(object sender, EventArgs e)
        {

            printPreviewDialog1.Document = printDocument1;
            printPreviewDialog1.ShowDialog();

        }

        private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            e.Graphics.DrawString(str, myFont, Brushes.Black, 100, 10);
        }
    }
0

Hi,

am not able to arrange text in proper manner in text file. can you please tell me how to do it...?

0

am not able to arrange text in proper manner in text file. can you please tell me how to do it...?

Make a new thread and we could tell you how to yes. Don't res and hi-jack a thread that is 5 years old and dead for over a year.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.