+ Reply to Thread
Results 1 to 4 of 4

Thread: feed problem in Receipt Printing using vb.net

  1. #1
    tgshivakumar is offline VB.NET Forum Newbie tgshivakumar is on a distinguished programming path ahead
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Jun 2009
    Age
    28
    Posts
    1
    Reputation
    0

    Default feed problem in Receipt Printing using vb.net

    Hi All,

    I am developing a POS receipt printing program.

    When i print the item to printer, Printer is automatically doing form feed. I donot want the printer to perform form feed. It should stop after my print is over. [ withouth scrolling paper out ]

    I tried RAWPrinterHelper class provided by microsoft for printing [ its not doing form feed ] , but the problem is, i am not able to set font for print information. So i am having alignment problem when data gets printed.

    So i decided to go with printdocument. but its doing form feed automatically.

    snippet of code which is using printdocument for printing.

    Dim MyPrintObject As New clsTextPrint(strPrintInfo)
    ' Set font, if required
    MyPrintObject.Font = New Drawing.Font("Courier New", 10)
    MyPrintObject.Print()

    I checked complete internet resource. not finding relevant information.

    Please help me out friends.

    Regards
    Shiva.

  2. #2
    elizas is offline VB.NET Forum Newbie elizas is on a distinguished programming path ahead
    .NET Framework
    .NET 2.0
    Join Date
    Jan 2010
    Location
    India
    Age
    29
    Posts
    5
    Reputation
    0

  3. #3
    Mateus is offline VB.NET Forum Newbie Mateus is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2010
    Posts
    12
    Reputation
    7

    Default

    I too am having great difficulty stopping a receipt printer from feeding out an extra 7 inches of paper before stopping.

    The reason, I think, is that a Form Feed code (hex 0c) is automatically added by VB to the print file. This seems to cause some printers to get confused.

    Any one got any suggestions? Can you remove the Form Feed?

    Thanks,
    M.
    Last edited by Mateus; 07-08-2010 at 10:42 AM.

  4. #4
    Mateus is offline VB.NET Forum Newbie Mateus is on a distinguished programming path ahead
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2010
    Posts
    12
    Reputation
    7

    Default

    Result, solved it! Actually it was simple - the default printing commands in .Net just aren't compatible with my client's printer.

    I followed the code here: How to send raw data to a printer by using Visual Basic .NET to print direct to the printer and it works perfectly!


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

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