Код: Выделить всё
void pqm_OnJobStatusChange(object Sender, PrintJobChangeEventArgs e)
{
try
{
PrintSystemJobInfo job = e.JobInfo;
if (job == null) return;
if (job.IsSpooling)
{
job.Pause(); // Getting error here
}
else if (job.IsPaused)
{
PrintQueue pq = job.HostingPrintQueue;
pq.Refresh();
if (JobDetails(printer, e.JobID))
{
job.Resume();
}
else
{
job.Cancel();
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
System.Printing.PrintJobException: 'Произошло исключение при настройке задания печати. Ошибка Win32: неверный параметр.
Подробнее здесь: https://stackoverflow.com/questions/793 ... g-the-prin