0

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?

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

How can you install the 32bit drivers on a 64 bit system? oO
I had the same problem. I suppose the solution was using 64bit driver and sdk dll, but building x86 in visual studio worked. See: Label printing development using b-pac SDK in a C# application
how can I use custome p-touch template files with label printer?
0

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.

4 Comments

I'm not sure what you mean. Where are you getting Microsoft drivers for a label printer?
go to the page of the Printer settings where you can install a new Driver. Now there is a Dialog where you can click "Windows update". Windows Looks for new Drivers, after that you should see two different ql550 or p-touch Drivers in your case - one from Brother itself, the other from Microsoft. I installed the MS one and all was fine.
Do you mean the 'Update driver software' in Device Manager? If so, then it just tells me that I already have the best driver installed. If I check the list of compatible drivers it only shows the driver from Brother.
Ah, I see what you mean now. Unfortunately when I update no 9800PCN drivers show up at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.