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?