-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I'm using the function PrintJob.Transfer but is not working, I got an Win32Exception "access denied"
This is what I'm doing
I'm running the app under admin privileges
try
{
using (PrinterQueueWatch.PrinterInformation PrinterInfo = new PrinterQueueWatch.PrinterInformation("HP LaserJet P1006", PrinterQueueWatch.SpoolerApiConstantEnumerations.PrinterAccessRights.Printer_Access_Administer, false))
{
var job = PrinterInfo.PrintJobs.get_ItemByJobId(Id); //the value of job is not null.
if (job != null)
{
job.Transfer("Microsoft Print to PDF", false);
}
else
{
System.Diagnostics.Debug.WriteLine("Print job not found.");
}
}
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine("Error: " + ex.Message);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels