46
PDF-XChange Driver API SDK
55
When a synchronous event is fired, PDF-XChange will wait until the application has finished this
event.
All events have a JobID parameter which specifies an internal Job identifier of the printed document.
This ID can be used when multiple documents are printing to determine from which document the
event was fired.
The following events are supported in PDF-XChange Driver v4.
·Asynchronous Events:
o
Event OnStartDoc is fired when a new document starts to print.
o
Event OnStartPage is fired for each page when it starts to print.
o
Event OnEndPage is fired for each page after it prints.
oEvent OnEndDoc is fired when the complete document is spooled by the GDI.
·Synchronous Events:
oEvent OnDocSpooled is fired immediately when PDF-XChange starts processing the document
that was printed by the GDI.
o
Event OnFileSaved is fired when the PDF file is saved.
o
Event OnFileSent is fired when emailing of the PDF file was enabled and after the email was
sent. If emailing is not enabled this event will not fire.
o
Event OnError is fired when an error occurs during the processing of the PDF file.
3.3.1
Asynchronous Events
The following Asynchronous events are supported in PDF-XChange Driver v4.
·
Event OnStartDoc is fired when a new document starts to print.
·Event OnStartPage is fired for each page when it starts to print.
·Event OnEndPage is fired for each page after it prints.
·Event OnEndDoc is fired when the complete document is spooled by the GDI.
3.3.1.1
Event OnStartDoc
This event is fired when a new document starts to print.
Declaration:
C#
event OnStartDoc(int JobID, string lpszDocName, string lpszAppName);
C++
HRESULT OnStartDoc(LONG JobID, BSTR lpszDocName, BSTR lpszAppName);
VB
Event OnStartDoc(JobID As Long, lpszDocName As String, lpszAppName As String)
JobID
Internal Job identifier.