Printing to NovaPDF from service on Win8 - PrintTicket failu

Post here any questions/suggestions you have about novaPDF SDK or novaPDF OEM.

Printing to NovaPDF from service on Win8 - PrintTicket failu

Postby mirojanosik » 04 Apr 2013, 09:23

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.
mirojanosik
 
Posts: 3
Joined: 04 Apr 2013, 09:04

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

Postby Softland » 09 Apr 2013, 10:21

Are you using the latest build version of novaPDF 7.7?
Softland
 
Posts: 146
Joined: 16 Dec 2009, 12:48
Location: Cluj-Napoca, Romania

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

Postby mirojanosik » 09 Apr 2013, 13:31

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.
mirojanosik
 
Posts: 3
Joined: 04 Apr 2013, 09:04

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

Postby Softland » 18 Apr 2013, 14:53

Thank you too for the clarification, this might help other users.
Softland
 
Posts: 146
Joined: 16 Dec 2009, 12:48
Location: Cluj-Napoca, Romania


Return to Developer Tools



Who is online

Users browsing this forum: No registered users and 1 guest

cron