API Reference
OfficeImageExportBuilder`2
Shared fluent image-export surface used by OfficeIMO document packages.
Inheritance
- Object
- OfficeImageExportBuilder`2
Type Parameters
- TBuilder
- Concrete builder type returned from fluent methods.
- TOptions
- Document-specific image export options.
Methods
public TBuilder As(OfficeImageExportFormat format) #TBuilderConfigures the output image format.
Parameters
- format OfficeIMO.Drawing.OfficeImageExportFormat
public TBuilder AtDpi(Double dpi) #TBuilderSets a target output density and lets the document adapter resolve its logical-unit scale.
Parameters
- dpi System.Double
public TBuilder ConfigureOptions(Action<TOptions> configure) #TBuilderConfigures the complete document-specific option set for settings that do not have a dedicated fluent shortcut.
Parameters
- configure System.Action{`1}
public OfficeImageExportResult Export() #OfficeImageExportResultExports using the currently configured format and options.
public OfficeImageExportResult Export(CancellationToken cancellationToken) #OfficeImageExportResultExports using the currently configured format and observes cancellation during supported render stages.
Parameters
- cancellationToken System.Threading.CancellationToken
public async Task<OfficeImageExportResult> ExportAsync(CancellationToken cancellationToken = default) #Task<OfficeImageExportResult>Exports asynchronously when the adapter owns a genuine asynchronous render path.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public TBuilder FitWithin(Int32 maximumWidth, Int32 maximumHeight) #TBuilderFits output within the specified pixel dimensions without changing aspect ratio or enlarging it.
Parameters
- maximumWidth System.Int32
- maximumHeight System.Int32
public TBuilder FitWithinHeight(Int32 maximumHeight) #TBuilderFits output within the specified pixel height without enlarging it.
Parameters
- maximumHeight System.Int32
public TBuilder FitWithinWidth(Int32 maximumWidth) #TBuilderFits output within the specified pixel width without enlarging it.
Parameters
- maximumWidth System.Int32
public TBuilder ForPreview() #TBuilderConfigures a standard preview profile: PNG, 1x scale, white background.
public TBuilder ForPrint(Double dpi = 300) #TBuilderConfigures a print profile with an explicit target DPI.
Parameters
- dpi System.Double = 300
public TBuilder OnFileConflict(OfficeImageExportFileConflictPolicy policy) #TBuilderSets how file saves handle an existing destination.
Parameters
- policy OfficeIMO.Drawing.OfficeImageExportFileConflictPolicy
public TBuilder OnRasterOverflow(OfficeRasterOverflowBehavior behavior) #TBuilderSets the policy applied when requested raster dimensions exceed a safety limit.
Parameters
- behavior OfficeIMO.Drawing.OfficeRasterOverflowBehavior
public OfficeImageExportResult Save(String path) #OfficeImageExportResultSaves the exported image to a file path.
Parameters
- path System.String
public OfficeImageExportResult Save(Stream stream) #OfficeImageExportResultWrites the exported image to a stream.
Parameters
- stream System.IO.Stream
public async Task<OfficeImageExportResult> SaveAsync(String path, CancellationToken cancellationToken = default) #Task<OfficeImageExportResult>Asynchronously saves the exported image to a file path.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public async Task<OfficeImageExportResult> SaveAsync(Stream stream, CancellationToken cancellationToken = default) #Task<OfficeImageExportResult>Asynchronously writes the exported image to a stream.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public TBuilder WithBackground(OfficeColor color) #TBuilderSets the export background color.
Parameters
- color OfficeIMO.Drawing.OfficeColor
public TBuilder WithBackground(String color) #TBuilderSets the export background from a named color or hexadecimal color value.
Parameters
- color System.String
public TBuilder WithFont(String familyName, Byte[] data, OfficeFontStyle style = Regular) #TBuilderAdds a deterministic caller-supplied TrueType face.
Parameters
- familyName System.String
- data System.Byte[]
- style OfficeIMO.Drawing.OfficeFontStyle = Regular
public TBuilder WithFonts(OfficeFontFaceCollection fonts) #TBuilderAdds deterministic caller-supplied TrueType faces.
Parameters
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
public TBuilder WithImageCodec(IOfficeRasterImageCodec imageCodec) #TBuilderSets the optional decoder used for embedded source-image formats outside Drawing's built-in set.
Parameters
- imageCodec OfficeIMO.Drawing.IOfficeRasterImageCodec
public TBuilder WithMaximumRasterPixels(Int64 maximumPixels) #TBuilderSets the maximum pixel allocation for one raster result.
Parameters
- maximumPixels System.Int64
public TBuilder WithPolicy(Action<OfficeImageExportPolicy> configure) #TBuilderConfigures diagnostic acceptance before results are returned or committed.
Parameters
- configure System.Action{OfficeIMO.Drawing.OfficeImageExportPolicy}
public TBuilder WithProgress(IProgress<OfficeImageExportProgress> progress) #TBuilderSets a progress observer for render and save stages.
Parameters
- progress System.IProgress{OfficeIMO.Drawing.OfficeImageExportProgress}
public TBuilder WithQuality(OfficeImageExportQuality quality) #TBuilderSelects a shared output-density preset while retaining format, fonts and safety limits.
Parameters
- quality OfficeIMO.Drawing.OfficeImageExportQuality
public TBuilder WithRasterEncoding(Action<OfficeRasterEncodingOptions> configure) #TBuilderConfigures format-specific raster encoding settings.
Parameters
- configure System.Action{OfficeIMO.Drawing.OfficeRasterEncodingOptions}
public TBuilder WithRenderTimeout(TimeSpan timeout) #TBuilderSets the maximum duration allowed for one render operation.
Parameters
- timeout System.TimeSpan
public TBuilder WithScale(Double scale) #TBuilderSets the output scale.
Parameters
- scale System.Double
public TBuilder WithTextShaping(IOfficeTextShapingProvider provider, String language = null) #TBuilderUses a host shaping engine for complex-script raster text.
Parameters
- provider OfficeIMO.Drawing.IOfficeTextShapingProvider
- language System.String = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object