Click or drag to resize
Pdftools logo

Converter Class

The class to convert PDF documents to PDF/A

Inheritance Hierarchy
SystemObject
  PdfTools.InternalNativeBase
    PdfTools.InternalNativeObject
      PdfTools.PdfA.ConversionConverter

Namespace: PdfTools.PdfA.Conversion
Assembly: PdfTools (in PdfTools.dll) Version: 1.4.0+fc8bb87ea2616e7f35d94e0588d333abae862a7a
Syntax
C#
public class Converter : NativeObject

The Converter type exposes the following members.

Constructors
 NameDescription
Public methodConverter 
Top
Methods
 NameDescription
Public methodConvert

Convert a document to PDF/A.

Note that it is highly recommended to use ConversionEvent to detect critical conversion events.
Public methodEquals
(Inherited from NativeObject)
Public methodGetHashCode
(Inherited from NativeObject)
Top
Events
 NameDescription
Public eventConversionEvent

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.

Top
See Also