I've done this and it work great , but is using the System.Printing library.
using (PrintServer ps = new PrintServer()) { using (PrintQueue pq = new PrintQueue(ps, printerName, PrintSystemDesiredAccess.AdministratePrinter)) { pq.Purge(); } }
I need to use PrintQueueWatch library, here is where the function Job.Transfer is
using (PrinterQueueWatch.PrinterInformation PrinterInfo = new PrinterQueueWatch.PrinterInformation("HP LaserJet P1006", PrinterQueueWatch.SpoolerApiConstantEnumerations.PrinterAccessRights.SERVER_ALL_ACCESS, true)) { PrinterInfo.PrintJobs.get_ItemByJobId(Id).Transfer("Microsoft Print to PDF", false); }
I even trie the diferent options of PrinterQueueWatch.SpoolerApiConstantEnumerations.PrinterAccessRights and the result is the same
access denied.