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

You're using windows, the driver handles it for you.

commented: clear answer, great +4

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

Well if you can print to your thermal printer you already have your answers

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

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.

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);
        }
    }

Four year old thread, everyone involved is dead now.

Hi,

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.