Skip to main content

Search

Search

Automatically Delete Print Job If Printer In Error

Comments

2 comments

  • Avatar
    Ian Cummings
    Moderator

    Referring to the BarTender Help system you can make use of the Printer() class to check the PrinterStatusChanged event.  Your application could keep an updated log of each printer, so as not to direct a print job to a printer that does not have a ready status.  You'll need to make sure status monitoring is enabled in the driver, and that Printer Maestro is running on all necessary print servers.

     

    Avoid checking the status of a given printer at time of printing to it, as this will affect performance.

     

    public void Demo()
    {
       // Initialize a new BarTender print engine. 
       using (Engine btEngine = new Engine())
       {
          // Start the BarTender print engine.
          btEngine.Start();
    
          // Get the list of printers.
          Printers btPrintersList = new Printers();
    
          // Connect PrinterStatusChanged event.
          btPrintersList.Default.PrinterStatusChanged +=
             new EventHandler<PrinterEventArgs>(PrinterMonitor_PrinterStatusChanged);
    
          // Give the user time to change the printer status.
          Console.WriteLine("Press Enter to Continue...");
          Console.Read();
    
          // Stop the BarTender print engine.
          btEngine.Stop();
       }
    }
    

    Note sure how to delete a print job in the print queue without searching the internet, there is probably a Windows/.NET API to do this somewhere.

    0
  • Avatar
    Legacy Poster

    Thank you!  I will give this a try.

    I did try searching to see if something existed to delete a print job in the queue, but didn't find an awful lot.  Will try again with different search criteria.

     

    Thanks

    0

Please sign in to leave a comment.