Android Code Snippet Multiple printer codes on one line

Discussion in 'Code Snippets' started by rkmoray, Oct 25, 2018.

  1. rkmoray

    rkmoray Active Member Licensed User

    I am working on a POS app, and it is almost complete.
    I am working on the receipt portion at the moment and I hit a road block.
    I need a left justified and I right justified on the same line.
    catagory(left) price(right)

    I have tried

    Code:
    Dim ESC_JUSTIFY_LEFT  As String = Chr(27)&"a"&Chr(0)
        
    Dim ESC_JUSTIFY_CENTER As String = Chr(27)&"a"&Chr(1)
        
    Dim ESC_JUSTIFY_RIGHT  As String = Chr(27)&"a"&Chr(2)
    Printer.AddBuffer_Writeline(ESC_POS.BoldOn  & ESC_POS.FontA_DoubleWide &  ESC_JUSTIFY_LEFT &  strCategory &  ESC_JUSTIFY_Right & strPrice )
    but it does print correctly.

    Any help would be appreciated
     
  2. MarcoRome

    MarcoRome Expert Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice