Now I'm trying to write a simple C # program that sends a command to the printer to print plain text, but does not know how to do this. There are two main problems that I now face
1, How to contact the printer?
After doing some search on Google, but did not get a satisfactory result, I went to the Brothers homepage and found the so-called b-PAC3 SDK
The b-PAC * software development kit is a software tool for Microsoft® Windows® that allows you to print custom shortcuts from your own applications.
After you downloaded and installed it, in the directory where it was installed, I found a folder called "Samples" - there are code samples written in another language (VB, VS, VSC, ...). I was hoping these code samples would work as this SDK and printer come from the same company. But they did not. Let me show you one of these samples here: (code in C #)
/************************************************************************* b-PAC 3.0 Component Sample (RfidRW) (C)Copyright Brother Industries, Ltd. 2009 *************************************************************************/ using System; using System.Collections.Generic; using System.Text; namespace ConsoleSampleCSharp { class Program { private const int NOERROR = 0; private const string ANTENNA_READER_WRITER = "Reader/Writer side"; static void Main(string[] args) { // Create Rfid Instance bpac.RfidClass rfid = new bpac.RfidClass(); // Rfid Instance string selectedDevice; // selected device /* GetInstalledDevices */ Console.WriteLine("==GetInstalledDevices()=="); object[] arrDevices = (object[])rfid.GetInstalledDevices(); if (rfid.ErrorCode == NOERROR) { Console.WriteLine("Succeed to GetInstalledDevices()"); int index = 0; foreach (string device in arrDevices) { Console.WriteLine(String.Format("[{0}] {1}", index, device)); index++; } // select device Console.WriteLine("Please Select Device"); int selectedDeviceIndex = int.Parse(Console.ReadLine()); selectedDevice = arrDevices[selectedDeviceIndex].ToString(); } else { Console.WriteLine("Failed to GetInstalledDevices()"); goto CleanUp; } // .... } } }
When I run this code, the first problem arises: (it is displayed exactly the same as in the quote below, sorry, I can not post the image because of the low reputation)
== GetInstalledDevices () ==
Succeed in GetInstalledDevices ()
Select "Device"
There was no mistake, but it looks like the program cannot find my device, I do not know why this is happening.
2 How to write a QL style team?
I know that each type of printer has its own command language, so after searching on the Brother site I found a link:
Brother QL Series Command Reference (QL-500/550/560/570 / 580N / 650TD / 700/1050 / 1060N)
I myself have no experience with a thermal printer, and, unfortunately, there is no example in this command, which makes it very difficult for me to understand how a command should be written.
Has anyone worked with Brother QL serial printers?
ps: The printer I use is Brother QL 560