Results 1 to 2 of 2

Thread: Printing Text with black back color in VB.net & TSC TTP-244 Pro Printer.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2010
    Posts
    283

    Printing Text with black back color in VB.net & TSC TTP-244 Pro Printer.

    Hi everyone,

    I am designing a barcode label for my client. He provided me a sample and wants to design the same. I have attached pictures which client is provided and what I designed.
    I have a problem for which I need your help, there is a text line with black background and the text with white color. I tried a lot to find some solution but not luck. If anyone can help me how to print text in white with black background, please let me know.

    I have attached files and my code also, if anyone can help me will be appreciated. Thank you.

    PRINTER MODEL: TSC TTP-244 PRO.


    Code:
            Dim B1 As String = txtBarcode.Text.Trim
            Dim WT1 As String = "TSC Printers"
            Dim status As Byte = 0
            Dim result_unicode() As Byte = System.Text.Encoding.GetEncoding(1200).GetBytes("ساحل گارمنٹس")
            Dim result_utf8() As Byte = System.Text.Encoding.UTF8.GetBytes("TEXT 0,00,""ARIAL.TTF"", 0, 12, 12 ,""utf8 test Wörter auf Deutsch""")
    
            'Call about()
            status = usbportqueryprinter() '0 = idle, 1 = head open, 16 = pause, following <ESC>!? command of TSPL manual
            Call openport("TSC TTP-244 Pro") ' openport("TSC TE210")
            Call sendcommand("SIZE 100 mm, 25.4 mm")
            Call sendcommand("SPEED 4")
            Call sendcommand("DENSITY 12")
            Call sendcommand("DIRECTION 1")
            Call sendcommand("SET TEAR ON")
            Call sendcommand("CODEPAGE UTF-8")
            Call clearbuffer()
    
    
            ' Call windowsfont(40, 490, 48, 0, 0, 0, "Arial", "Windows Font Test")
            ' Call windowsfontUnicode(40, 550, 48, 0, 0, 0, "Arial", result_unicode)
    
            Call windowsfont(5, 8, 26, 0, 2, 0, "Arial", "(SMD) " & GlbCompanyName)
            Call windowsfont(415, 8, 26, 0, 2, 0, "Arial", "(SMD) " & GlbCompanyName)
    
            Call windowsfontUnicode(250, 8, 28, 0, 2, 0, "Arial", result_unicode)
            Call windowsfontUnicode(665, 8, 28, 0, 2, 0, "Arial", result_unicode)
    
            Call windowsfont(5, 40, 26, 0, 0, 0, "Tahoma", txtItemDescription.Text.Trim) 'Product Name
            Call windowsfont(415, 40, 26, 0, 0, 0, "Tahoma", txtItemDescription.Text.Trim) 'Product Name
    
            Call sendBinaryData(result_utf8, result_utf8.Length)
    
            'Call downloadpcx(Application.StartupPath & "\UL.PCX", "UL.PCX")
            'Call sendcommand("PUTPCX 0,0, ""UL.PCX""")
    
            ' Call downloadbmp(Application.StartupPath & "\SG1.BMP", "SG1.BMP")
            ' Call sendcommand("PUTBMP 0,0, ""SG1.BMP""")
    
            'Call downloadpcx(Application.StartupPath & "\ITEMDESCRIPTION.BMP", "ITEMDESCRIPTION.BMP")
            'Call sendcommand("PUTBMP 5,5, ""ITEMDESCRIPTION.BMP""")
    
    
            Call windowsfont(155, 155, 26, 0, 2, 0, "Arial", "Phone: " & GlbCompanyPhoneNumber)
            Call windowsfont(565, 155, 26, 0, 2, 0, "Arial", "Phone: " & GlbCompanyPhoneNumber)
    
    
            Call barcode("5", "75", "128", "80", "1", "0", "2", "2", B1)
            Call barcode("415", "75", "128", "80", "1", "0", "2", "2", B1)
    
    
            'Packing
            Call windowsfont(155, 80, 24, 0, 2, 0, "Arial", "PCS.: " & txtPacking.Text.Trim)
            Call windowsfont(565, 80, 24, 0, 2, 0, "Arial", "PCS.: " & txtPacking.Text.Trim)
    
            'WholeSale Price
            Call windowsfont(155, 115, 24, 0, 2, 0, "Arial", "Rs.: " & Val(txtWholeSalePrice.Text).ToString("N2"))
            Call windowsfont(565, 115, 24, 0, 2, 0, "Arial", "Rs.: " & Val(txtWholeSalePrice.Text).ToString("N2"))
    
    
            Call printlabel("1", "1")
            Call closeport()
    Attached Images Attached Images   

  2. #2
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    682

    Re: Printing Text with black back color in VB.net & TSC TTP-244 Pro Printer.

    I assume you have the manual for the printer language:

    https://www.tscprinters.com/EN/Downl...df?file_type=0

    Page 72 shows how to print reversed text.

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