ConverterConversion |
The event for errors, warnings, and informational messages that occur during conversion
Report a conversion event that occurred in Convert(AnalysisResult, Document, Stream, ConversionOptions, OutputOptions). These events can be used to:
Note that if a document cannot be converted to the requested conformance, the Convert(AnalysisResult, Document, Stream, ConversionOptions, OutputOptions) throws an exception. However, even if the output document meets all required standards, the conversion might have resulted in differences that might be acceptable in some processes but not in others. Such potentially critical conversion issues are reported as conversion events.
We suggest checking which conversion events can be tolerated in your conversion process and which must be considered critical:
Events of severityWarning: In case of a warning, the output file is best presented to a user to decide if the result is acceptable. The properties message, context, and page in combination with the output file are helpful to make this decision.
If a manual review is not feasible, critical warnings should be classified as an Error. An exception to this is, if all processed input documents are similar in their content, e.g. because they have been created by a single source (application). In this case, the conversion result can be verified using representative test files and the event severity chosen accordingly.
public event EventHandler<ConverterConversionEventEventArgs> ConversionEvent