Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Claim BIXOLON Printer in POS.Net does nothing!

$
0
0

Hello there.

I am currently developing a POS application in WPF, I'm trying to use POS for Net 1.14.1 to comunicate with my BIXOLON SRP-350plusIII printer without success.

I have installed the OPOS driver given by BIXOLON and configured the printer. With the OPOS utility I can print test pages, also I have used the Sample Application -> TestApp included in the SDK for POS Net and everything works fine.

I don't know why in my WPF app I can't connecto to the printer, the problem itself is at the momment of Claiming the device, in this line the app just does nothing, no exception, nothing just stills and all of a sudden it stops the debugging and I have to re run the application.

This is the code that I am using:

private void Print()
        {
            PosExplorer posExplorer = new PosExplorer();
            DeviceInfo deviceInfo = null;
            PosPrinter posPrinter = null;

            string test = "test print 1\n";

            try
            {
                deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, "PosPrinterTest");
                posPrinter = (PosPrinter)posExplorer.CreateInstance(deviceInfo);
            }
            catch (Exception exception)
            {
                throw exception;
            }

            posPrinter.Open();
            posPrinter.Claim(1000); // Here just hangs and does nothing
            
            if (posPrinter.Claimed)
            {
                posPrinter.AsyncMode = false;
                posPrinter.DeviceEnabled = true;
                posPrinter.PrintNormal(PrinterStation.Receipt, test);

                posPrinter.DeviceEnabled = false;
                posPrinter.Release();
                posPrinter.Close();
            }
        }
Anyone knows what the problem might be?, as I told you.. I have already tested the printer in the OPOS utility by BIXOLON and in the TestApp in the SDK for POS Net, everything works fine.

Or anyone knows another way to print Sale Tickets?

Regards.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>