ConversionEvents

ConversionEvents class

Aggregates conversion lifecycle event handlers. Pass an instance to the Converter constructor’s events parameter or to the fluent WithEvents method. Prefer this over the individual ConverterSettings handler properties, which are obsolete.

public sealed class ConversionEvents

Constructors

Name Description
ConversionEvents() The default constructor.

Properties

Name Description
OnCompressionCompleted { get; set; } Fired when compression of conversion output completes. Only invoked in builds that include the compression pipeline (LIB_ZIP).
OnConversionCompleted { get; set; } Fired once when the conversion run finishes, regardless of success or failure.
OnConversionProgress { get; set; } Fired periodically with conversion progress as a percentage (0–100).
OnConversionStarted { get; set; } Fired once at the start of the conversion run, before any document is processed.
OnDocumentConverted { get; set; } Fired once per whole-document conversion that completes successfully.
OnDocumentFailed { get; set; } 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.
OnFontSubstituted { get; set; } Fired when a font referenced by the source document is not available and is substituted (either by a customer-supplied FontSubstitute rule, by the configured default font, or by the conversion pipeline’s internal fallback).
OnPageConverted { get; set; } Fired once per page when a per-page conversion completes successfully.
OnPageFailed { get; set; } Fired once per page when a per-page conversion fails. Also fired once for a contained item (an archive entry, an email attachment, a mailbox item) whose page fails to save because the item is corrupted or password-protected; that item is then delivered unchanged, as its original bytes, and the conversion of the remaining items continues.

See Also