Reputation: 1703
I need to print a label from a Brother P-Touch 9800 series label printer that is attached via USB.
I'm using the example project included with the SDK, so there shouldn't be any problems with the code itself, yet it won't print. No error messages of any kind, it doesn't stall or crash, it simply doesn't print. The Bpac reference has been included and is being included with 'using bpac'.
bpac.DocumentClass doc = new DocumentClass();
if (doc.Open(templatePath) != false)
{
//doc.SetBarcodeData(123, "asd");
doc.GetObject("objCompany").Text = txtCompany.Text;
doc.GetObject("objName").Text = txtName.Text;
Console.WriteLine(doc.GetObject("objName").Text);
Console.WriteLine(doc.GetObject("objCompany").Text);
// doc.SetMediaById(doc.Printer.GetMediaId(), true);
doc.DoPrint(0, "0");
doc.StartPrint("asdasd", PrintOptionConstants.bpoDefault);
doc.PrintOut(1, PrintOptionConstants.bpoDefault);
doc.EndPrint();
doc.Close();
}
I've tried printing from the regular editor which works just fine, so the computer has a connection and the printer works.
Anyone have any suggestions or know what the problem could be?
Upvotes: 0
Views: 5677
Reputation: 1703
In case anyone's wondering or run into this problem in the future, I found the solution to this.
The problem was the driver. Apparently the 64-bit drivers doesn't work properly. Why? I don't know. I installed the 32-bit drivers and it worked immediately.
Upvotes: 1
Reputation: 9
I had the same problem and I've figured out that it's faulty driver.
Install a new driver and click "Windows update". Now there are different QL Drivers. Some from Brother and some from Microsoft. I tried the Microsoft one and now it prints the document with the same code.
Upvotes: 0