Error initializing Print Options, error code: 1346

Error initializing Print Options, error code: 1346

Forum member · Jan 20, 2020
Hi, We get Error initializing Print Options to print to a networked printer; PrintJob printJob = new PrintJob(); printJob.Print("printserver\\printer", pdfFileName); The program have been tested on local printers. Any help would be appreciated, Tony

Re: Error initializing Print Options, error code: 1346

Support · Jan 21, 2020
Hello, The error code 1346 that is returned by the PrintManager is actually a Windows exception that PrintManager received while trying to create the print job. The error code 1346 points to an impersonation issue. Details on the error code can be found here . It is likely due to a permissions issue in the application where it is unable to access the printer. If you are using web application, there could also be an application level setting (in IIS settings or in web.config) that could be causing this error. Also you are passing the printer name and the file path in the Print method of PrintJob. You will need to create the PrintJob by passing the printer name and PDF file path and then print it. Below is the code sample. string pdfFileName = "Input PDF file path"; PrintJob printJob = new PrintJob((@"\\servername\printername", pdfFileName); printJob.Print(); Thanks, ceTe Software Support Team

Re: Error initializing Print Options, error code: 1346

Forum member · Feb 10, 2020
Hi, The identity impersonate="true" in my web config causing the error 1346. After change it to impersonate=false, the error gone. However, the printing still cannot complete, it simply hangs there! I've posted the details in the other thread. So you can close this one.