Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeSvgDrawingReaderOptions

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Controls bounded SVG import limits for trusted inputs that legitimately contain many elements.

Inheritance

  • object
  • OfficeSvgDrawingReaderOptions

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

public OfficeSvgDrawingReaderOptions() #

Properties

public CancellationToken CancellationToken { get; set; } #

Cancellation observed during SVG import and managed filter processing.

public string DefaultFontFamily { get; set; } #

Font family used by SVG text that does not declare one. The default preserves the existing shared-drawing contract; browser-oriented hosts can select a generic family that matches their user-agent profile.

public OfficeFontFaceCollection Fonts { get; } #

Scoped font faces available when SVG text must be converted to painted vector outlines. Callers can register web fonts without changing process-wide font state.

public OfficeSvgForeignObjectRenderer? ForeignObjectRenderer { get; set; } #

Optional caller-owned renderer for bounded inline XHTML inside SVG foreignObject elements. The returned drawing must use the exact viewport dimensions supplied by the context.

public double? ViewportWidth { get; set; } #

Width of a caller-resolved SVG viewport, in CSS pixels. Supply with OfficeSvgDrawingReaderOptions.ViewportHeight when a host layout owns the viewport size.

public double? ViewportHeight { get; set; } #

Height of a caller-resolved SVG viewport, in CSS pixels. Supply with OfficeSvgDrawingReaderOptions.ViewportWidth when a host layout owns the viewport size.

public int MaximumElements { get; set; } #

Maximum number of descendant and expanded reference elements. Increase this only for trusted SVG input.

public int MaximumGeometryCommands { get; set; } #

Maximum geometric path/polygon commands, including expanded references. Defaults to 20000; explicitly bounded fixed-page imports can request up to 1000000. Text, effects, and raster safety retain their separate limits.

public double MaximumViewportDimension { get; set; } #

Maximum SVG viewport width or height. Increase this only for trusted SVG input.

public double MaximumViewportPixels { get; set; } #

Maximum SVG viewport width-times-height area. Increase this only for trusted SVG input.

public int MaximumContentSafetyVisualComparisons { get; set; } #

Maximum full-document visual comparisons used for paint-order and background evidence. Set this to zero to use structural inspection only; the report records that visual comparison was disabled.

public long MaximumContentSafetyVisualPixels { get; set; } #

Cumulative rendered-pixel work allowed across the SVG content-safety baseline and comparison renders.

Fields

public const int DefaultMaximumElements #

Default maximum number of descendant and expanded reference elements.

Value: 10000
public const int MaximumAllowedElements #

Hard maximum accepted by the reader, even when explicitly requested.

Value: 100000
public const double DefaultMaximumViewportDimension #

Default maximum width or height of an imported SVG viewport.

Value: 8192
public const double MaximumAllowedViewportDimension #

Hard maximum viewport dimension accepted for explicitly trusted SVG input.

Value: 1000000
public const double DefaultMaximumViewportPixels #

Default maximum viewport area accepted by the reader.

Value: 16777216
public const double MaximumAllowedViewportPixels #

Hard maximum viewport area accepted for explicitly trusted SVG input.

Value: 268435456
public const int DefaultMaximumContentSafetyVisualComparisons #

Default maximum number of full SVG visual comparisons performed by content-safety inspection.

Value: 32
public const int MaximumAllowedContentSafetyVisualComparisons #

Hard maximum number of SVG visual comparisons accepted from a caller.

Value: 128
public const long DefaultMaximumContentSafetyVisualPixels #

Default cumulative rendered-pixel budget for SVG content-safety inspection.

Value: 33554432
public const long MaximumAllowedContentSafetyVisualPixels #

Hard maximum cumulative rendered-pixel budget accepted from a caller.

Value: 134217728