albatross
albatross

Reputation: 455

Brother Label Printer c# program with visual studio 2012 for windows8

I want to make a simple program which prints sth (Just wnt it to write sth )

I ve added Interop.bpac.dll (Found it from samples bin folder) I ve wrote this code

    private void buttonTry_Tapped_1(object sender, TappedRoutedEventArgs e)
    {
        bpac.DocumentClass doc = new DocumentClass();
        if(doc.Open("templateFile.lbx"))
        {
            doc.GetObject("field1").Text = "Hello";
            doc.GetObject("field2").Text = "World";

            doc.StartPrint("", PrintOptionConstants.bpoDefault);
            doc.PrintOut(1, PrintOptionConstants.bpoDefault);
            doc.EndPrint();
            doc.Close();

        }

    }

And it gives an error "Interop type 'bpac.DocumentClass' can not be embedded.Use the applicable interface instead." For now Im trying to print QL700 I ll try some other thermal receipt printers later And also I couldnt get the templateFile.lbx whats that and where does the program search this file?

Thanks :)

Upvotes: 1

Views: 1169

Answers (1)

Oleg Ilchekes
Oleg Ilchekes

Reputation: 11

Change Embed Interop Types to False

Upvotes: 1

Related Questions