I'm working in a project abaut PrinQueue.
I want to know all the information related to printJobs, the class PrintSystemInfoJob work fine, but when I need to Know the number of copies of a printed Job always return 1.
PrintSystemInfoJob CurrentJobSettins.CurrentPrintJob.CopyCount.Value is always 1.
1. - I Pause the job
2.- Then Thread.Sleep(1000)
3.- Refresh the PrintQueue and PrintJob
4.- Get values.
5.- Resume the Job.
All the values like TotalPages, PagesPrinted, JobStatus, JobSize are Ok, but CopyCount is always 1
I need some help , I don't know what else to do.
Thanks
Jayraj ChhayaPosted Jan 10, 2024, 6:16 AM
The CopyCount property in the PrintSystemInfoJob class represents the number of copies requested for a print job. It is used to determine the number of copies that should be printed. However, it seems that you are experiencing an issue where the CopyCount property always returns 1, regardless of the actual number of copies.
To troubleshoot this issue, let's explore a few possibilities:
Check the PrintQueue Settings: Ensure that the PrintQueue settings are correctly configured to allow multiple copies. Verify that the printer supports multiple copies and that the settings are properly applied.
Verify the PrintTicket: The CopyCount property is influenced by the PrintTicket settings. Make sure that the PrintTicket associated with the print job has the correct CopyCount value set. You can retrieve the PrintTicket using the
PrintSystemInfoJob.CurrentPrintTicketproperty.Consider PrintQueue Behavior: Some printers or print drivers may not provide accurate information about the number of copies. It's possible that the printer you are using does not report the correct CopyCount value. In such cases, you may need to rely on other methods or APIs to determine the number of copies.
Explore Alternative Approaches: If the above steps do not resolve the issue, you can consider alternative approaches to retrieve the number of copies. For example, you can try using the
PrintQueue.GetJobmethod to retrieve the print job and access theNumberOfCopiesproperty directly.Here's an example of how you can retrieve the number of copies using the
PrintQueue.GetJobmethod:By exploring these possibilities and considering alternative approaches, you should be able to retrieve the correct number of copies for your print jobs.
Jorge Carlos Iglesias AlvarezPosted Jan 17, 2024, 5:49 PM
Thanks for all the answers.
Looking for information on the internet I found a dll. PrintQueueWatch v 1.0.7 I works ok with the values of CopyCount, but if I print a .doc then the same happens, always is 1.
Making test with the virtual Printer of Windows 10, Microsoft Print to PDF something happens, If I print a document .pdf the total pages are ok incluiding the copies, but if I print a document .doc the value of total pages is just of one copy.
I think there's something witch the document .doc, I use diferent versions of Microsoft Office (2010, 2013, 2016, 2019) and still the same.
Anybody knows PrintQueueWatch, maybe I'm doing something wrong ?
Anybody knows If theres's something that I could do with the Microsoft Office, maybe update a driver, I don't know.
Muchas Gracias.
Anandu G NathPosted Jan 11, 2024, 3:55 AM
Check my Answer
Naimish MakwanaPosted Jan 10, 2024, 4:47 AM
I understand your issue. You’re trying to get the number of copies for a print job using
PrintSystemInfoJob.CurrentJobSettings.CurrentPrintTicket.CopyCount, but it always returns 1, even when you print multiple copies.This seems to be a known issue12. The
PrintTicket.CopyCountproperty corresponds to the Print Schema’sJobCopiesAllDocumentskeyword2. The Print Schema and related technologies are available in Microsoft .NET Framework 3.0 and later versions of Microsoft .NET Framework2. Please ensure .NET Framework 3.0 feature is enabled2.Unfortunately, it appears that the
CopyCountproperty might not always return the correct number of copies for all print drivers12. This could be due to the print driver not fully supporting the PrintTicket technology2.As an alternative, you might consider tracking the number of copies at the application level, if possible. When a print job is initiated, you could store the number of copies in your application and then use this stored value instead of relying on the
CopyCountproperty.Thanks
Sachin SinghPosted Jan 9, 2024, 8:31 PM
Try to use this