Image printing on the Datamax printer with C #

0

Good morning!

I have a label printing system Datamax printer that is done in C #. I need to create the impression of an image (logo) on the label and was following the steps in this forum:

  

link

But I could not make 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 commands (language Datamax), only when I send for printing, appears on the screen that the document was sent to the printer but does not print anything. Can anyone 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

From now on, grateful for the attention.

    
asked by anonymous 26.01.2016 / 11:14

0 answers