Using PosExplorer GetDevice WITH COM1

423 views Asked by At

I'm trying to use the OPOS for NET applications But I don't know how to use it with a fiscal printer that is connected to port COM1.

If I use an external library like this "http://www.impresoras-fiscales.com.ar/" the printer prints.

But I want to create my own library/application. So for that as per the comments I read, I need to have a logical name for the printer, but currently I don't have it and it is working with the other library.

I need to know how I can connect me to the printer as the other library using just the port COM number.

This is the code that I use with the other library:

nError = imprimir.IF_OPEN("192.168.0.5", 555);
            //nError = imprimir.IF_OPEN(oPunto.url, Convert.ToInt32(oPunto.puerto));
            nError = imprimir.IF_WRITE("@PONEENCABEZADO|1|Vendedor: " + oEmpleado.Nombre);
            if (IdMesa != 0)
            {
                nError = imprimir.IF_WRITE("@PONEENCABEZADO|2|Mesa: " + IdMesa);
            }
            else
            {
                nError = imprimir.IF_WRITE("@PONEENCABEZADO|2|Venta para llevar");
            }
            nError = imprimir.IF_WRITE("@PONEENCABEZADO|5|");
            nError = imprimir.IF_WRITE("@TIQUEABRE|C|");
foreach-->
nError = imprimir.IF_WRITE("@TIQUEITEM|" + DescProducto + "|" + Cantidad + "|" + Total + "|" + Iva + "|M|1|0|0|");

nError = imprimir.IF_WRITE("@TIQUEPAGO|Su Pago es de: |" + Total + "|T|");
        nError = imprimir.IF_WRITE("@TIQUECIERRA|T|");

In this case, I'm using the library to connect me by the network (see the IP) but I just need a desktop application that can print fiscal receipt. In the client computer, I install a small application where I set the COM port.

So, I need to have the same behavior but using my own code. Could you help me... Please see the way I connect to the printer just using the COM1. I need something similar

0

There are 0 answers