Click or drag to resize
Pdftools logo

ConverterConversionEvent Event

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:

  • Generate a detailed conversion report.
  • Detect and handle critical conversion events.

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:

  • Review the suggested severity of events. Each event has a default severity indicated by severity which is based on the event's category. Review the suggested severity of each EventCategory and determine the EventSeverity to be used in your process.
  • Handle events according to their severity.
    • Events of severityError: The conversion must be considered as failed.
    • 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.

    • Events of severityInformation: No further action is required.


Namespace: PdfTools.PdfA.Conversion
Assembly: PdfTools (in PdfTools.dll) Version: 1.1.0.0
Syntax
C#
public event EventHandler<ConverterConversionEventEventArgs> ConversionEvent

Value

EventHandlerConverterConversionEventEventArgs
See Also