Prasad De Zoysa
Prasad De Zoysa

Reputation: 2567

Brother QL-700 B-PAC SDK error 'System.IO.FileNotFoundException' in mscorlib.dll

I have the Brother QL-700 label printer and i have installed latest B-PAC SDK V3.2.001 64bit which was released end of last month. Also i have installed "B-PAC client component" on my windows 10 64 bit computer as well. Given template file(addr.LBX) prints successfully from P-touch Editor 5.2.

However B-Pac sdk faild to print from below C# program. It gives below error when executing the given code snippet,

'NamePlt.vshost.exe' (CLR v2.0.50727: NamePlt.vshost.exe): Loaded 'C:\Program Files\Brother bPAC3 SDK\Samples\VCS\NamePlt\bin\Debug\Interop.bpac.dll'. Module was built without symbols.Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll

Any support highly appreciated!

private const string TEMPLATE_DIRECTORY = @"C:\Program Files\Brother bPAC3 SDK\Templates\"; // Template file path
private const string TEMPLATE_FILE = "addr.LBX";    // Template file printing fine from the P-touch Editor

    public Form1()
    {
        InitializeComponent();
    }

    private void btnPrint_Click(object sender, EventArgs e)
    {
        string templatePath = TEMPLATE_DIRECTORY;

        templatePath += TEMPLATE_FILE;

        bpac.DocumentClass doc = new DocumentClass();
        if (doc.Open(templatePath) != false)
        {
            //doc.GetObject("objCompany").Text = txtCompany.Text;
            //doc.GetObject("objName").Text = txtName.Text;

            // doc.SetMediaById(doc.Printer.GetMediaId(), true);
            doc.StartPrint("", PrintOptionConstants.bpoDefault);
            doc.PrintOut(1, PrintOptionConstants.bpoDefault);
            doc.EndPrint();
            doc.Close();

            MessageBox.Show("Error code : " + doc.ErrorCode);

        }
        else
        {
            MessageBox.Show("Open() Error: " + doc.ErrorCode);
        }
    }

Upvotes: 0

Views: 1049

Answers (0)

Related Questions