Results 1 to 6 of 6

Thread: Print Text File from VB.net to EPSON Printer using ESC/POS

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    Print Text File from VB.net to EPSON Printer using ESC/POS

    How can I print a Text file (receipt.txt) from VB.net to EPSON Printer using ESC/POS?

    My printer is EPSON TM-U220D.

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,754

    Re: Print Text File from VB.net to EPSON Printer using ESC/POS

    I don't know what ESC or POS is, however if you're wanting to print in the .Net here are a few good links found here on the forum:
    1. A beginner's guide to printing in .net
    2. Printer class for vb.net
    3. DataGrid printer
    4. Printing multipage DGV


    The first two are really what you need. The first should be read to educate yourself on printing in .Net, the second provides an easy to use class to print plain text.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    Re: Print Text File from VB.net to EPSON Printer using ESC/POS

    thanks, what I mean is using ESC/POS code in printer which has no driver.. like in printing receipts in Point of Sales..

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Print Text File from VB.net to EPSON Printer using ESC/POS

    You would most likely need to either use a generic text only driver and print to that or if it is a serial printer then you could send the data directly out the serial port.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2006
    Posts
    719

    Re: Print Text File from VB.net to EPSON Printer using ESC/POS

    thanks, DataMiser but how can i that? kindly give me a sample of code please?

  6. #6
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Print Text File from VB.net to EPSON Printer using ESC/POS

    If you are using the generic text only print driver then you should have a look at this thread which I started a while back. Posts $3 and #5 show methods of doing this.
    http://www.vbforums.com/showthread.p...005&highlight=

    If you are not using a print driver and are connected with an RS232 connection then you would need to use serial communications to send the data to the printer. A quick search should land you some examples of how to use the serial port class for this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width