tags:

views:

317

answers:

0

I'm trying to print a label to my brother p-touch QL-550 and I'm getting an error saying:

"The roll of labels or tape inside the machine does not matches the one selected in the application."

I'm trying to do this from within a WPF application, but I'm not sure the type of application matters.

            VisitorBadge badge = new VisitorBadge();
            badge.SetInformation(new VisitorBadgeInformation {CompanyName = visitor.Company, Name = visitor.Name});


            badge.Measure(new Size(339, 109));
            badge.Arrange(new Rect(
                              new Point(0, 0),
                              badge.DesiredSize));



            printDlg.PrintVisual(badge, string.Format("Visitor Badge: {0}", visitor.Name));

I used the following regular csharp code and got the same error:

PrintDocument document = new PrintDocument();
            document.PrintPage += (o, e) =>
                                      {
                                          e.Graphics.DrawString("This is not fun.", new Font("Courier New", 12), Brushes.Black, 0, 0);
                                      };
            document.Print();