Notification of File Saved without RegisterWindowMessage

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

Notification of File Saved without RegisterWindowMessage

Postby DanCooperstock » 12 Sep 2014, 18:17

I'm converting an app using the novaPDF SDK to one that cannot receive arbitrary events. Currently I'm using RegisterWindowMessage to register the events, and RegisterEventWindow to specify the window to receive the events, in my app that CAN receive arbitrary events.

Is there some other way to do this, to at least know when a print is done (or has an error, and if so, which error), for programming environments that can't handle arbitrary events?

I see in your Help the functions RegisterNovaEvent and WaitForNovaEvent. Can they be used to replace the code that I can no longer use? Something I don't understand with WaitForNovaEvent is how to tell which event was completed when it returns, and how to code it to be sure to catch all events. If that will work for me, could you point me at a code sample that uses it to handle multiple events (like page ended and file saved). (Or can you not get page ended events when you use RegisterNovaEvent, unlike when you use RegisterWindowMessage?)

Thanks.
DanCooperstock
 
Posts: 5
Joined: 07 Dec 2010, 16:41
Location: Toronto Canada

Re: Notification of File Saved without RegisterWindowMessage

Postby Softland » 15 Sep 2014, 15:56

The only way to receive multiple events is with the windows messages (using RegisterEventWindow / RegisterWindowMessage). The RegisterNovaEvent and WaitForNovaEvent cand be used with only one event. The usage is like this:

Just before starting a print job, you have to inform novaPDF printer that you want to wait for an event. Call:

pNova.RegisterNovaEvent("NOVAPDF_EVENT_FILE_SAVED")

Immediately after you send the job to the printer call:

pNova.WaitForNovaEvent(nMiliseconds, bTimeout)

This function will return when the event was signaled or when the time was elapsed. If the time was elapsed bTimeout is TRUE and if the event was signaled, bTimeout is FALSE.

There can be used one of these strings for events:
"NOVAPDF_EVENT_START_DOC"
"NOVAPDF_EVENT_END_DOC"
"NOVAPDF_EVENT_FILE_SAVED"

The events can be used only to wait in your application until the PDF is started or finished by the printer, but you cannot get an error code or information about print progress.
Softland
 
Posts: 146
Joined: 16 Dec 2009, 12:48
Location: Cluj-Napoca, Romania

Re: Notification of File Saved without RegisterWindowMessage

Postby DanCooperstock » 15 Sep 2014, 17:55

So I take it that if it times out there is no way to find out what the problem was. That doesn't seem like it would be adequate for our purposes.
DanCooperstock
 
Posts: 5
Joined: 07 Dec 2010, 16:41
Location: Toronto Canada


Return to Developer Tools



Who is online

Users browsing this forum: No registered users and 1 guest

cron