Skip to content

PdfConverter

PdfConverter is the BaseConverter subclass selected by ConverterFactory for .pdf source files. Unlike the other seven converters, its source and target formats are the same: it either passes a plain PDF through unchanged, or upgrades it to PDF/A conformance when requested.

Purpose

  • Pass a plain (non-PDF/A) PDF through unchanged when no conformance upgrade is requested (BR-SFC-003, BR-SFC-021).
  • Upgrade a PDF to PDF/A conformance via a reload-and-resave pass when requested (BR-SFC-020).
  • Identify itself to ConverterFactory and downstream consumers as the Pdf conversion type.

Context

  • Namespace: PdfAPI.SyncFusionCore
  • Assembly/package: PdfAPI.SyncFusionCore (Pdf.Local.Client NuGet package)

Public members

Member Signature Purpose
PdfConverter PdfConverter() Creates a ready-to-use PdfConverter instance for ConverterFactory to invoke against PDF source documents (.pdf), notably for the PDF/A normalization pass; the constructor body is empty*, so no state is established beyond the base type's fields.
ConversionType override SourceConversionType ConversionType { get; } Returns SourceConversionType.Pdf, identifying this converter's source format to ConverterFactory and to the assembled PdfResult.

Inherited public members

Members in this section are inherited from BaseConverter in PdfAPI.SyncFusionCore. They are available on this type through inheritance.

Member Signature Purpose Origin
Convert PdfResult Convert(Stream stream, ConvertRequest request) Executes the full conversion: times the operation, invokes ConfigureConverter and ConvertItem, and assembles a PdfResult with Status, Elapsed, and PdfProcessorType = Syncfusion; captures rather than propagates conversion exceptions (BR-SFC-006, BR-SFC-010). PdfAPI.SyncFusionCore — BaseConverter

Behavioral notes

  • The output format on the result reflects whether a PDF/A upgrade was requested, not merely whether the input was already PDF/A (BR-SFC-008).
  • The PDF/A upgrade path reloads the already-saved output as a PdfLoadedDocument, sets its conformance level, and saves again — the same two-pass pattern used by extraction and merge (BR-SFC-020).
  • A conversion failure is captured by the inherited Convert method and reported through the result rather than thrown (BR-SFC-010).

Constraints and usage notes

  • Not intended to be constructed directly by application code; ConverterFactory constructs and invokes it based on the source file extension.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • PdfApi.SyncFusionCore\Convert\PdfConverter.cs