Zum Hauptinhalt gehen

Suche

Suche

Cant Print Bartender Label From C Shar

Kommentare

4 Kommentare

  • Avatar
    Ian Cummings
    Moderator

    It looks like BarTender is unable to open the document as the file cannot be found:

     

    Make sure you prefix the path/filename with the @ string literal escape character.

     

    Example: LabelFormatDocument btFormat = btEngine.Documents.Open(@"c:\MyLabel.btw");

     

    I would guess this is why the file is not being found.

    0
  • Avatar
    Legacy Poster

    Thanks a lot,

    Now it is printing with this code:

    using (Seagull.BarTender.Print.Engine btEngine = new Seagull.BarTender.Print.Engine())
                {
                    Seagull.BarTender.Print.LabelFormatDocument btFormat;
                    btEngine.Start();
                    // Show BarTender UI for debugging purpose (Set "None" to hide)
                    //btEngine.Window.VisibleWindows = Seagull.BarTender.Print.VisibleWindows.All;
     
                    btFormat = btEngine.Documents.Open(Program.LabelPath);
     
                    // Print
                    btFormat.Print();
                    Thread.Sleep(164);
                    btEngine.Stop();
                }
    But it's print 2 labels, I need only one label.
    Can I set the number of copies ?
    Best Regards
    Hamzi
    0
  • Avatar
    Ian Cummings
    Moderator

    You'd want to set the IndenticalCopiesOfLabel property, otherwise it inherits whatever is set in the document file itself.

     

    // Set the number of copies.
    btFormat.PrintSetup.IdenticalCopiesOfLabel = 1;
    
    0
  • Avatar
    Legacy Poster

    Thanks a lot for your fat answer, I will check this.

    Best regards

    Hamzi.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.