我可以使用蓝牙将便携式打印机的Windows Phone 8打印出来吗?

ngo*_*lez 6 printing bluetooth zebra-printers windows-phone-8

我正在Windows Phone 8上开发一个应用程序.这个应用程序必须使用像Zebra MZ 220移动打印机这样的移动打印机打印票证.

我一直在谷歌搜索使用Windows Phone 8获取有关打印到蓝牙打印机的信息,但没有太多的信息.

我担心必须在另一个像android这样的移动操作系统上开始新的开发,因为wp8不支持在蓝牙上打印.

有什么关于它的例子吗?有没有与Microsoft Windows Phone 8兼容的便携式打印机?

Fon*_*a16 7

此代码适用于Zebra 420和Nokia 820.

 private async void PrintStuff()
        {
            string command = "^XA^LH30,30^F020,10^AD^FDHello World^FS^XZ";
            Byte[] buffer = new byte[command.Length];
            buffer = StringToAscii(command);

            PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
            var pairedDevices = await PeerFinder.FindAllPeersAsync();

            if (pairedDevices.Count == 0)
            {
                Debug.WriteLine("No paired devices were found.");
            }
            else
            {
                PeerInformation selectedDevice = pairedDevices[0];
                StreamSocket socket = new StreamSocket();
                await socket.ConnectAsync(selectedDevice.HostName, "1");                
                await socket.OutputStream.WriteAsync(WindowsRuntimeBufferExtensions.AsBuffer(buffer));
            }
        }
Run Code Online (Sandbox Code Playgroud)


Ovi*_*ler -2

Zebra为 Windows Mobile .NET框架提供 API,用于在 WinMo .NET 中进行打印