Notification of File Saved without RegisterWindowMessage

Post here any questions/suggestions you have about novaPDF SDK or novaPDF OEM.
Post Reply
DanCooperstock
Posts: 7
Joined: Tue Dec 07, 2010 2:41 pm

Notification of File Saved without RegisterWindowMessage

Post by DanCooperstock »

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.

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

Re: Notification of File Saved without RegisterWindowMessage

Post by Lorant (Softland) »

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.

DanCooperstock
Posts: 7
Joined: Tue Dec 07, 2010 2:41 pm

Re: Notification of File Saved without RegisterWindowMessage

Post by DanCooperstock »

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.

Claudiu (Softland)
Posts: 286
Joined: Wed Dec 16, 2009 12:46 pm

Re: Notification of File Saved without RegisterWindowMessage

Post by Claudiu (Softland) »

We always recommend using the latest version (v11 in this case).

Post Reply