My users print files (PDF,docx etc...) in apps like word, excel or e.g ERP Systems from different printers on there Computers. I need to copy this files to a specific folder to save them in a storage.
This is my current code.
using System.Management;
bool NewPrintJob = false;
string wmiQuery = "SELECT * FROM Win32_PrintJob";
ManagementObjectSearcher jobsSearcher = new
ManagementObjectSearcher(wmiQuery);
ManagementObjectCollection jobCollection = null;
List<PrintJob> printJobs = new List<PrintJob>();
while (!NewPrintJob)
{
jobCollection = jobsSearcher.Get();
NewPrintJob = jobCollection.Count > 0; //New Print Job?
}
EDIT
But how can I access the document to save it to a folder in the file format that the user has selected when printing?
The developmentlanguages dont need to be C# or C++.