|
How to use events |
Top Previous Next |
|
If you want to wait for a print job to be finished, you can register some Windows events and wait for them to be signaled by novaPDF Printer.
Before starting the print job, you have to inform novaPDF that you want to be wait for an event. Call RegisterNovaEvent(LPCWSTR p_wsEventName) with one one of the next strings: NOVAPDF_EVENT_START_DOC NOVAPDF_EVENT_END_DOC NOVAPDF_EVENT_FILE_SAVED
After you send the job to the printer, call WaitForNovaEvent(ULONG p_nMiliseconds). This function will return when the event was signaled or when the time was elapsed.
If you just want to be sure that the print job was started, the profile was read, and you want to proceed modifying the profile for the next job, you should wait for the NOVAPDF_EVENT_START_DOC event. If you are interested where the PDF file is ready so you can do further actions with it, you should wait for the NOVAPDF_EVENT_FILE_SAVED event. |