# OfficeImageExportPolicy

Acceptance policy applied to structured image-export diagnostics.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeImageExportPolicy.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L7)

**Modifiers**

sealed

Acceptance policy applied to structured image-export diagnostics.

## Inheritance

- object
- OfficeImageExportPolicy

## Usage

Explore 7 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.

### Returned or exposed by 3

- Property [OfficeImageExportOptions.Policy](/api/core/officeimo-drawing-officeimageexportoptions/#property-policy)
- Method [OfficeImageExportPolicy.Clone](/api/core/officeimo-drawing-officeimageexportpolicy/#method-clone)
- Property [OfficeRenderingProfile.Policy](/api/core/officeimo-drawing-officerenderingprofile/#property-policy)

### Accepted by parameters 4

- Method [OfficeFontFallbackPack.CreateRenderingProfile](/api/core/officeimo-drawing-officefontfallbackpack/#method-createrenderingprofile-officeimo-drawing-iofficetextshapingprovider-string-officeimo-drawing-iofficerasterimagecodec-officeimo-drawing-officeimageexportpolicy) parameter `policy`
- Method [OfficeImageExportReport.Require](/api/core/officeimo-drawing-officeimageexportreport/#method-require-officeimo-drawing-officeimageexportpolicy) parameter `policy`
- Method [OfficeImageExportResult.Require](/api/core/officeimo-drawing-officeimageexportresult/#method-require-officeimo-drawing-officeimageexportpolicy) parameter `policy`
- Constructor [OfficeRenderingProfile.OfficeRenderingProfile](/api/core/officeimo-drawing-officerenderingprofile/#constructor-ctor-string-officeimo-drawing-officefontfacecollection-officeimo-drawing-iofficetextshapingprovider-string-officeimo-drawing-iofficerasterimagecodec-officeimo-drawing-officeimageexportpolicy) parameter `policy`

Filter members 

Show inherited

## Constructors

`public OfficeImageExportPolicy()` [#](#constructor-ctor)

[OfficeImageExportPolicy.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L7)

## Methods

`public OfficeImageExportPolicy Clone()` [#](#method-clone)

[OfficeImageExportPolicy.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L25)

Creates an independent policy snapshot.

Returns

`OfficeImageExportPolicy`

`public void EnsureAccepted(IEnumerable<OfficeImageExportDiagnostic> diagnostics)` [#](#method-ensureaccepted-collections-generic-ienumerable-officeimo-drawing-officeimageexportdiagnostic)

[OfficeImageExportPolicy.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L34)

Throws when the diagnostics violate this policy.

Parameters

**diagnostics System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficeImageExportDiagnostic> required**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public bool FailOnLoss { get; set; }` [#](#property-failonloss)

[OfficeImageExportPolicy.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L10)

Rejects any approximation, omission, or failure diagnostic.

`public bool RequireNoOmissions { get; set; }` [#](#property-requirenoomissions)

[OfficeImageExportPolicy.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L13)

Rejects omission diagnostics while allowing documented approximations.

`public bool RequireNoFailures { get; set; }` [#](#property-requirenofailures)

[OfficeImageExportPolicy.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L16)

Rejects error/failure diagnostics.

`public IReadOnlyCollection<string> FailOnDiagnosticCodes { get; set; }` [#](#property-failondiagnosticcodes)

[OfficeImageExportPolicy.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeImageExportPolicy.cs#L20)

Stable diagnostic codes that should fail the export.

<!-- PowerForge markdown artifact sha256:137BEBA24E2548AF2AD95108354582029E589C12C35E5E6CDD4D02041E262BFC -->
