Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeImageExportOptions

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core

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

Constructors

Methods

public OfficeImageExportResult EnsureAccepted(OfficeImageExportResult result) #
Returns: OfficeImageExportResult

Validates 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 requiredposition: 0
public Double GetEffectiveScale(Double logicalWidth, Double logicalHeight) #
Returns: Double

Resolves the requested scale after applying optional output dimension caps while preserving aspect ratio.

Parameters

logicalWidth System.Double requiredposition: 0
logicalHeight System.Double requiredposition: 1
public static Void ValidateScale(Double scale, String paramName = "scale") #
Returns: Void

Validates that an export scale is finite and positive.

Parameters

scale System.Double requiredposition: 0
Scale value to validate.
paramName System.String = "scale" optionalposition: 1
Parameter name used for the thrown exception.

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.

Value: 50000000
public const Int32 DefaultMaximumOutputCount #

Default maximum number of images produced by one batch operation.

Value: 10000
public const Int64 DefaultMaximumTotalRasterPixels #

Default maximum aggregate raster pixels produced by one batch operation.

Value: 500000000
public const Int64 DefaultMaximumTotalEncodedBytes #

Default maximum aggregate encoded bytes produced by one batch operation.

Value: 1073741824