A1VBCode Forums

Datamax Image printing in vb.net


http://www.a1vbcode.com/vbforums/Topic32274.aspx

By chaw12 - 4/29/2015

Hi to all! I have this system which is one of the capability is to create a barcode using DPL command. I have it running and infact the company has been using it for 2 years from now. But I have this specific barcode where I have to embed the image in the barcode.



I cant make the code below to work;





Dim pText As New StringBuilder

Dim logo = RawPrinterHelper.SendImageToPrinter(80, 10, "c:\logo.bmp")



pText.AppendLine(Chr(2) + "L" + Chr(13)) ' tells the printer to start executing the command

pText.AppendLine("D11" + Chr(13)) ' Dot size

pText.AppendLine("H15" + Chr(13))



pText.AppendLine(Chr(2) + "qF" + Chr(13)) ' reset / clean module

pText.AppendLine(Chr(1) + "D" + Chr(13))

pText.AppendLine(Chr(2) + "I" + "F" + "B" + "Test" + Chr(13) + logo) ' donwload image called logo into module D(bmp)



pText.AppendLine("1Y11000" + "0020" + "0020Test" + Chr(13))



pText.AppendLine("E" + Chr(13))



RawPrinterHelper.SendStringToPrinter(ComboBox1.Text, pText.ToString) ' sends to printer