Print Job Watcher could not be started.

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF PrintManager for .NET (v4)  /  Print Job Watcher could not be started.

DynamicPDF PrintManager for .NET (v4) Forum

Ever since these big spooler security issues have been coming out we are seeing more of this occurring on customer systems.
I believe the stations have had Microsoft's Spooler Security "Fix" pushed out to them and it is giving errors.

OS:

Windows 10

DLL:

File: DynamicPDF.Printing.NET4.x86.dll 
File description: "DynamicPDF PrintManager PE for .NET" 
Product version: 4.0.0 (Build 37436)

Code:

            ' Print using CETE Print Manager
            Using MyPrintJob As New Printing.PrintJob(sPrinterName, sFile)

               MyPrintJob.DocumentName = Path.GetFileNameWithoutExtension(sFile)
               MyPrintJob.PrintOptions.Color = False
               MyPrintJob.Print()

            End Using

Error:

cete.DynamicPDF.Printing.PrintingException: Print Job Watcher could not be stated.  Failed to create job change handles.  Error code:1936
Posted by a ceTe Software moderator
Hi,

We recommend updating to the latest version (v4.19). You can download latest product from NuGet (Package ID: ceTe.DynamicPDF.Printing.NET) or from our website here.

Error code 1936 indicates that, remote connections to the Print Spooler are blocked by a policy set on your machine. This is returned by the spooler and PrintManger is passing on the error it received from the spooler while creating the PrintJob.

Thanks,
ceTe Software Support Team

Tried 4.19.0.44079
Still getting this error.

ceTe.DynamicPDF.Printing.PrintingException: Print Job Watcher could not be started. Failed to create job change handles. Error code:1936
This happens only in case of network printers.
This happens only in case of network printers.
Posted by a ceTe Software moderator
Hi,

The error code 1936 indicates that Remote connections to the Print Spooler are blocked by a policy set on your machine. The print spooler is throwing this error while creating a PrintJob and our API is just passing on the error to client application.

Try configuring things on your end so the user account under which the application is running can access the specified print spooler.

Thanks,
ceTe Software Support Team
Wondering if this step can be bypassed in some way.
I see printing PDF to physical from Adobe and other apps working perfectly fine.

" user account under which the application is running can access the specified print spooler." - How do we check that ?

Note : We are just printing to a network printer and not directly to physical printer.
Posted by a ceTe Software moderator
Hi,

Try using the UNC path to access the specific network printer and see it works. Please refer to the documentation on printing to a network printer here.

We recommend installing the respective printer driver on the system where in application is running.

Also try getting the list of printers which your application can access dynamically using the GetLocalPrinters method and print the Default printer name. Use the correct printer's name and see it works for you.

Here is a code sample to get locally installed printers.

            Printer[] printerList = Printer.GetLocalPrinters();
            for (int i = 0; i < printerList.Length; i++)
            {
                string printerName = printerList[i].Name;
                Console.WriteLine("Installed Printers on the System:: " + printerName);
            }
            Console.Read();

You can Open the Devices and Printers on the system>>right click on the required printer driver/printer>>Printer Properties>>Security Tab >>Add a user and give all permissions.

Thanks,
ceTe Software Support Team
Tried above mentioned code to get the printer paths..
But now it fails in that process itself " Printer[] printerList = Printer.GetLocalPrinters();" with the same error.
Posted by a ceTe Software moderator
Hi,

Since you are unable to get locally installed printers, it could be a security issue on your end. The error code 1936 indicates that Remote connections to the Print Spooler are blocked by a policy set on your machine. The print spooler is throwing this error while creating a PrintJob and our API is just passing on the error to the client application. There is nothing in our API that is causing this error and the respective print spooler is causing this issue.

Thanks,
ceTe Software Support Team
We also tried "You can Open the Devices and Printers on the system>>right click on the required printer driver/printer>>Printer Properties>>Security Tab >>Add a user and give all permissions." this doesnt help either.
Posted by a ceTe Software moderator
Hi,

The error code : 1936 is windows error and you can find more information here. This indicates that the WIN 32 API is unable to access the spooler due to security set on the server. Make sure the application has access to the print spooler by resolving the policy settings. There is nothing in our API is causing this error and it is just passing on the error it received from the print spooler.

Thanks,
ceTe Software Support Team
We are able to print PDF to the network printers from  my machine using any other desktop applications like "Chrome" , "Adobe Acrobat DC" , ""
But when I try to do print programmatically using  Dynamic PDF API it fails.
I wonder why the print spooler issue is not applicable to printing in "Chrome" , "Adobe Acrobat DC"
Posted by a ceTe Software moderator
Hi,

Your application is likely running under a different user context. Try creating a simple console application and running it. It will run with your user context by default. If that works, you will need to find out what user context your other application is running under and set the permissions appropriately.

Thanks,
ceTe Software Support Team
Other application like “chrome” or “Adobe” are running in the same user context as my application.. The interesting aspect : we also have a legacy printing mechanism in the same app for some old workflow’s  and that works fine, its just the new flow which uses dynamic pdf throws up this error. Its reproducible even with sample console app.
Posted by a ceTe Software moderator
Hi,

Please send over following information to support@dynamicpdf.com so we can look into it further.

1. Simple console application which uses static data to recreate the behavior.
2. Exact version and build number of the DynamicPDF PrintManager for .NET DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.
3. Full error message along with stack trace.
4. Steps to  recreate the error.
5. Details about the environment on which the application is running.
6. Legacy workflow details (where in printing is fine)
7. New workflow details where you are getting the error.

Please include link for this forum in your email to support.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 11:18 PM.