API Reference
OfficeImageExportOptions
Shared options for dependency-free image export pipelines.
Inheritance
- Object
- OfficeImageExportOptions
Remarks
Document packages should inherit from this type for format-neutral settings and keep document-specific layout policy in their own option types.
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters
- Extension method OfficeDrawing.ApplyImageExportOptions
- Method OfficeDrawing.ExportImage
- Method OfficeDrawingImageExportExtensions.ApplyImageExportOptions
- Method OfficeImageExportBatchProcessor.CreateGuardedAsyncConsumer
- Method OfficeImageExportBatchProcessor.CreateGuardedConsumer
- Method OfficeImageExportBatchProcessor.ForEachOrdered``1
- Method OfficeImageExportBatchProcessor.Run
- Method OfficeImageExportBatchProcessor.RunAsync
- Method OfficeRasterExportPlanner.Resolve
- Method OfficeRasterExportPlanner.Resolve
Constructors
public OfficeImageExportOptions() #Methods
public OfficeImageExportResult EnsureAccepted(OfficeImageExportResult result) #OfficeImageExportResultValidates this options snapshot and throws when an exported result violates its acceptance policy. Format packages call this at their direct export boundary so fluent and non-fluent APIs behave identically.
Parameters
- result OfficeIMO.Drawing.OfficeImageExportResult
public Double GetEffectiveScale(Double logicalWidth, Double logicalHeight) #DoubleResolves the requested scale after applying optional output dimension caps while preserving aspect ratio.
Parameters
- logicalWidth System.Double
- logicalHeight System.Double
public static Void ValidateScale(Double scale, String paramName = "scale") #VoidValidates that an export scale is finite and positive.
Parameters
- scale System.Double
- Scale value to validate.
- paramName System.String = "scale"
- Parameter name used for the thrown exception.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public Double Scale { get; set; } #Output scale multiplier. A value of 2 creates a 2x raster or SVG surface.
public Nullable<Int32> MaximumOutputWidth { get; set; } #Optional maximum output width in pixels (or CSS pixels for SVG). The requested scale is reduced as needed while preserving aspect ratio; smaller outputs are never enlarged.
public Nullable<Int32> MaximumOutputHeight { get; set; } #Optional maximum output height in pixels (or CSS pixels for SVG). The requested scale is reduced as needed while preserving aspect ratio; smaller outputs are never enlarged.
public OfficeColor BackgroundColor { get; set; } #Background color used behind rendered document content.
public OfficeRasterEncodingOptions RasterEncoding { get; set; } #Format-specific settings used when the selected output is raster-based.
public Int64 MaximumRasterPixels { get; set; } #Maximum number of pixels allocated for one raster export. Encoder-specific limits may reduce the effective ceiling further.
public OfficeRasterOverflowBehavior RasterOverflowBehavior { get; set; } #Controls whether an oversized raster request is reduced to a safe scale or rejected.
public IOfficeRasterImageCodec ImageCodec { get; set; } #Optional decoder for embedded source-image formats not handled by the dependency-free Drawing core.
public Nullable<Double> TargetDpi { get; set; } #Optional target output density. Document adapters map logical units to this DPI.
public OfficeFontFaceCollection Fonts { get; set; } #Caller-supplied deterministic TrueType faces used before platform fallback.
public IOfficeTextShapingProvider TextShapingProvider { get; set; } #Optional host text shaper used for deterministic complex-script raster output.
public String TextShapingLanguage { get; set; } #Optional BCP 47 language hint passed to TextShapingProvider.
public OfficeImageExportPolicy Policy { get; set; } #Diagnostic acceptance policy applied before an export is returned or committed.
public IProgress<OfficeImageExportProgress> Progress { get; set; } #Optional progress observer for rendering and saving.
public Int32 MaximumOutputCount { get; set; } #Maximum number of results accepted from one batch export.
public Int64 MaximumTotalRasterPixels { get; set; } #Maximum aggregate raster pixels accepted from one batch export.
public Int64 MaximumTotalEncodedBytes { get; set; } #Maximum aggregate encoded bytes accepted from one batch export.
public TimeSpan RenderTimeout { get; set; } #Maximum duration allowed for one render operation. The default is unlimited. Cancellation-aware renderers are interrupted at the deadline; legacy renderers that do not observe cancellation are rejected when they return after the deadline.
public Int32 MaximumDegreeOfParallelism { get; set; } #Maximum concurrent independent renders. Defaults to one because callers must opt in when their document model can be read concurrently.
public virtual Double LogicalUnitsPerInch { get; } #Logical document units represented by one inch. Point-based adapters override with 72.
Fields
public const Int64 DefaultMaximumRasterPixels #Default maximum number of pixels allocated for one raster export.
50000000public const Int32 DefaultMaximumOutputCount #Default maximum number of images produced by one batch operation.
10000public const Int64 DefaultMaximumTotalRasterPixels #Default maximum aggregate raster pixels produced by one batch operation.
500000000public const Int64 DefaultMaximumTotalEncodedBytes #Default maximum aggregate encoded bytes produced by one batch operation.
1073741824