Printing to NovaPDF from service on Win8 - PrintTicket failu

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

Printing to NovaPDF from service on Win8 - PrintTicket failu

Postby mirojanosik » Thu Apr 04, 2013 7:23 am

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.

Softland
Posts: 156
Joined: Wed Dec 16, 2009 10:48 am
Location: Cluj-Napoca, Romania
Contact:

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

Postby Softland » Tue Apr 09, 2013 8:21 am

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

Postby mirojanosik » Tue Apr 09, 2013 11:31 am

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.

Softland
Posts: 156
Joined: Wed Dec 16, 2009 10:48 am
Location: Cluj-Napoca, Romania
Contact:

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

Postby Softland » Thu Apr 18, 2013 12:53 pm

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


Return to “Developer Tools”