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 sourceIReadOnlyList<PossibleConversions>possible=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 previous late-stage chain methods (.OnConversionCompleted(...).OnConversionFailed(...) placed after WithOptions(...), and .OnCompressionCompleted(...) placed after .Compress(...)) continue to work but are obsolete and planned for removal in v26.9. 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