How can I diagnose a problematic Print Job ?

Platform: WPF| Category: Printing

The example code begins by refreshing the current print queue object with PrintQueue’s Refresh property. This ensures that the object’s properties accurately represent the state of the physical printer that it represents. Then the application gets the collection of print jobs currently in the print queue by using the “GetPrintJobInfoCollection” method. Next the application loops through the PrintSystemJobInfo collection and compares each ’Submitter’ property with the alias of the complaining user. If they match, the application adds identifying information about the job to the string that will be presented. (The userName and jobList variables are initialized earlier in the application.)

[C#]

foreach (PrintQueue pq in myPrintQueues)
{
    pq.Refresh();
    PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
    foreach (PrintSystemJobInfo job in jobs)
    {
        // Since the user may not be able to articulate which job is problematic,
        // present information about each job the user has submitted.
        if (job.Submitter == userName)
        {
            atLeastOne = true;
            jobList = jobList + '\nServer:' + line;
            jobList = jobList + '\n\tQueue:' + pq.Name;
            jobList = jobList + '\n\tLocation:' + pq.Location;
            jobList = jobList + '\n\t\tJob: ' + job.JobName + ' ID: ' + job.JobIdentifier;
        }
    }// end for each print job    

}// end for each print queue 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.