POS Receipt Printing Not Working RRS feed

  • Question

  • My application I am building is a point of sales system. Its uses the pos for.net sdk , so it can communicate with my Opos devices(display,printer, cashdrawer etc.)

    The problem I am having is getting the application to print a receipt. I am able to print a line of text.

    I want to learn how to format the text to be printed. 

    Here is some code that I have tried:

    myString = "My Pos Application Name" + Chr(13).ToString + Chr(10).ToString 'chr(13) = return , Chr(10) = Line Feed myPrinter.PrintNormal(PrinterStation.Receipt, myString) myString = "Thank You for Your Business" + Chr(13).ToString + Chr(10).ToString myPrinter.PrintNormal(PrinterStation.Receipt, myString)

    However, it prints the text on the paper, but I need to add alignment and formating.

    I hope there is just a simple way of doing this.

    I have been Trying to figure this out for a week now.

    My Printer Name is  IBM Suremark 4610

    Friday, January 18, 2013 12:00 AM


All replies

  • Would anyone know how to do this? I really Need Help on this one.
    Friday, January 18, 2013 2:29 AM
  • Hi Jcharles,

    Welcome to the MSDN Forum.

    Would you like to take a look at this similar thread: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/3d0c6f15-df3a-49db-865e-bb98829b2590 

    It shows the way to print the a few font style.

    I hope this will be helpful.

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Monday, January 28, 2013 1:41 PM
    Monday, January 21, 2013 2:50 AM
  • Mike,

    i have similar "problems".
    The other thread use class PrintEngine.

    Does POS for .NET have such a class?
    Our POS printer knows only 2 fonts: normal and compressed.
    (subscript, doubleheight by control char)

    Does POS printers have GID driver, since today i thought it's text-only?
    (with graphic support through ESC commands)


    Monday, January 21, 2013 8:27 AM
  • You may want to look at the UPOS specification http://www.nrf-arts.org/sites/default/files/UnifiedPOS113.zip and find the section with the so called one shot escape commands (Data Characters and Escape Sequesnces) tha do all kinds of formatting. Add those to your text string according to the guidelines in the specification and send the text to the printer via PrintNormal.  
    • Marked as answer by Mike Feng Monday, January 28, 2013 1:41 PM
    Monday, January 21, 2013 1:56 PM
  • What you have looks to be correct. I created a template using Chr13 and Chr10 for the example in my book: http://www.annabooks.com/Book_PGPOS.html. When the receipt prints out, it has the format I want.

    There are other print methods in the class for wide, color, etc., but I have never tried these since my printer was simple black and white with no graphics.


    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET

    • Marked as answer by Mike Feng Monday, January 28, 2013 1:41 PM
    Monday, January 21, 2013 6:34 PM