The fluent API composes a conversion as a single chained expression. It’s implemented by the FluentConverter class and the staged interfaces in the GroupDocs.Conversion.Fluent namespace — each call returns a new stage interface that exposes only the methods valid for the next step.
Pipeline stages
A fluent chain moves through four stages:
Stage
Purpose
Methods
Entry
Configure the converter before any source is opened
The stream factory receives a SavePageContext with the page number and source format — return a fresh stream for each call.
Inspecting a document
Two terminal methods replace Convert() when you need information about the source rather than a converted output:
// Available target formats for this sourcePossibleConversionspossible=FluentConverter.Load("sample.pdf").GetPossibleConversions();// Format-specific metadata (page count, properties, etc.)IDocumentInfoinfo=FluentConverter.Load("sample.pdf").GetDocumentInfo();
Both accept a load-options stage if the source needs one:
Since version 26.6, event handlers are registered through the ConversionEvents aggregator via the entry-stage WithEvents(...) method. The aggregator covers both pipeline lifecycle events (OnConversionStarted / OnConversionProgress / OnConversionCompleted) and per-result events (OnDocumentConverted / OnDocumentFailed / OnPageConverted / OnPageFailed / OnCompressionCompleted):
The .OnConversionCompleted(...) and .OnConversionFailed(...) handlers placed after WithOptions(...) remain supported. The late-stage .OnCompressionCompleted(...) placed after .Compress(...) was removed in version 26.9 — register it with WithEvents(e => e.OnCompressionCompleted = ...) instead. See the Conversion events guide for the full migration story, including the rename of per-result handlers from OnConversion* to OnDocument* / OnPage*.
See also
Conversion events — full reference for WithEvents(...) and ConversionEvents