0
Good morning!
I have a label printing system on the Datamax printer that is made in C#. I need to generate the impression of an image (logo) on the label and was following the steps described in this forum :
But I couldn’t make any progress. Apparently the process that needs to be done is to convert the image (.bmp) to bytes, and then to string and then send that string to print via DPL (Datamax language) commands, only at the moment I send it to print, appears on the screen that the document was sent to the printer but does not print anything. Can someone help me?
The code I’m using is this:
////Impressão logotipo
FileStream fileImagem = new FileStream("img\\LOGO_DNV.bmp", FileMode.Open, FileAccess.Read);
StreamReader imagemTexto = new StreamReader(fileImagem, Encoding.ASCII);
string imagemString = imagemTexto.ReadToEnd().ToString();
imagemTexto.Close();
fileImagem.Close();
String nomeArquivo = "LOGO_DNV.txt";
StreamWriter arquivo = new StreamWriter(nomeArquivo, false, Encoding.ASCII);
arquivo.WriteLine(imagemString);
sb.AppendLine(soh + "D"); //Desabilita comandos imediatos
sb.AppendLine(stx + "ICBLOGO: " + cr);
sb.AppendLine(imagemString + cr);
sb.AppendLine("1Y4300001500020Logo" + cr);
qtdEtiqueta = "0001";
sb.AppendLine("Q" + qtdEtiqueta + cr);//quantidade de etiquetas impressas
sb.AppendLine("E" + cr);//termina a formatação da etiqueta e imprime
Thanks in advance for your attention.
Welcome to SOPT. Would like to [Edit] your post and add the code you are using, so we can analyze and suggest a change. Thank you
– David
Thank you, David! Post edited and added the code I’m using.
– Danimar Veriato