OnDocumentFailed

ConversionEvents.OnDocumentFailed property

Fired once per whole-document conversion that fails, and once per contained item (an archive entry, an email attachment, a mailbox item) that cannot be loaded and is skipped while the conversion of the remaining items continues. For such an item the context carries its name, hierarchy level and item index, and Unknown as its source and target format. Also fired once per contained item that cannot be converted because it is corrupted or password-protected. Such an item is delivered unchanged, as its original bytes, and the conversion of the remaining items continues; the context carries its name, its detected source format, hierarchy level and item index. When that failure occurs while a page of the item is saved in a page-by-page conversion, OnPageFailed is fired instead. It reports the final outcome of a document only: when a load fails and the load options delegate is asked again (Attempt 2), it is fired after that attempt was declined or failed, and never for a document the second attempt loads.

public Action<ConvertedContext, Exception> OnDocumentFailed { get; set; }

See Also