Page 1 of 1

Printing to NovaPDF from service on Win8 - PrintTicket failu

Posted: Thu Apr 04, 2013 7:23 am
by mirojanosik
My application has issue on Windows 8. Application runs as a windows service. Service creates a teporary public novaPDF profile, activates it and then it sends a print job to novaPDF printer. On that moment exception occurs:

Generating report PDF exception ---> System.Printing.PrintQueueException: PrintTicket provider failed to bind to printer. Win32 error: -2147467231
at MS.Internal.Printing.Configuration.PTProvider..ctor(String deviceName, Int32 maxVersion, Int32 clientVersion)
at MS.Internal.Printing.Configuration.PTProviderBase.Create(String deviceName, Int32 maxVersion, Int32 clientVersion)
at System.Printing.PrintTicketManager..ctor(String deviceName, Int32 clientPrintSchemaVersion)
at System.Printing.PrintQueue.get_DefaultPrintTicket()
... call from my service application ...

c# code for the print job:

Code: Select all

                    var printServer = new LocalPrintServer();
                    PrintQueue queue = printServer.GetPrintQueue("novaPDF");
                    PrintTicket pt = queue.DefaultPrintTicket.Clone();
                    pt.PageMediaSize = new PageMediaSize(PageMediaSizeName.ISOA4); // set size of media (paper)
                    XpsDocumentWriter docWriter = PrintQueue.CreateXpsDocumentWriter(queue);

                    // set size of printable area
                    copyOfDocument.PageSize = PageSize;
                    docWriter.Write(copyOfDocument, pt);
It works well on Windows XP/7. We tried to install novaPDF 7.7 but error remains.
OS: Windows 8 Pro 64-bit (6.2, Build 9200)

I'm wondering if it is something regarding rights to print on a printer from a service ... and I can't find cause of this error. Please do you know how to solve this problem?

--edit--
I have tried to modify service properties to start as a local user and I also tried to grant all the rights on the novaPDF printer to the local users. Exception still remains.

Re: Printing to NovaPDF from service on Win8 - PrintTicket f

Posted: Tue Apr 09, 2013 8:21 am
by Lorant (Softland)
Are you using the latest build version of novaPDF 7.7?

Re: Printing to NovaPDF from service on Win8 - PrintTicket f

Posted: Tue Apr 09, 2013 11:31 am
by mirojanosik
Yes I am.

I have found that this problem is not regarding the NovaPDF. This problem is common for all the printers on Windows 8 (virtual or physical).

Thanks for support.

Re: Printing to NovaPDF from service on Win8 - PrintTicket f

Posted: Thu Apr 18, 2013 12:53 pm
by Lorant (Softland)
Thank you too for the clarification, this might help other users.