Printing to NovaPDF from service on Win8 - PrintTicket failu

Post here any questions/suggestions you have about novaPDF SDK or novaPDF OEM.
Post Reply
mirojanosik
Posts: 3
Joined: Thu Apr 04, 2013 7:04 am

Printing to NovaPDF from service on Win8 - PrintTicket failu

Post 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.

Lorant (Softland)
Posts: 177
Joined: Wed Dec 16, 2009 10:48 am

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

Post by Lorant (Softland) »

Are you using the latest build version of novaPDF 7.7?

mirojanosik
Posts: 3
Joined: Thu Apr 04, 2013 7:04 am

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

Post 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.

Lorant (Softland)
Posts: 177
Joined: Wed Dec 16, 2009 10:48 am

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

Post by Lorant (Softland) »

Thank you too for the clarification, this might help other users.

Post Reply