I'm using version 5.5.314.0 of the PDF-XChange Editor Core API.
I would like to run specified code in the PdfCtl_OnEvent method of the AxPDFXEdit.AxPXV_Control when the user closes a document tab.
For example, I'm using the following code in order to register and handle an event when a user pastes an annotation:
Code: Select all
private int eventIdAnnotsInsterted;
...
this.eventIdAnnotsInsterted = this.pdfCtl.Inst.Str2ID("e.annots.inserted");
...
this.pdfCtl.EnableEventListening2(this.eventIdAnnotsInsterted, true);
...
private void PdfCtl_OnEvent(object sender, AxPDFXEdit._IPXV_ControlEvents_OnEventEvent e)
{
#if DEBUG
Debug.WriteLine("pdfCtl.OnEvent: e.nEventID=={0}", e.nEventID);
#endif
if (e.nEventID == this.eventIdActiveDocChanged)
{
PdfEditorEx.PdfEditorActiveDocChanged();
}
if (e.nEventID == this.eventIdAnnotsInsterted)
{
PdfEditorEx.PdfEditorAnnotsInserted(e.pEvent);
}
}
The list of I eventIds I'm aware of are the following:
- e.annots.inserted
- e.activeDocChanged
- e.document.modStateChanged
Martin