# PdfRewritePreservationMatrixScenario

Describes one executable row in a PDF rewrite-preservation proof matrix.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfRewritePreservationMatrixScenario.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L7)

**Modifiers**

sealed

Describes one executable row in a PDF rewrite-preservation proof matrix.

## Inheritance

- object
- PdfRewritePreservationMatrixScenario

## Usage

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

- Method [PdfRewritePreservationMatrixScenario.WithSourceFeatures](/api/pdf/officeimo-pdf-pdfrewritepreservationmatrixscenario/#method-withsourcefeatures-string)

Filter members 

Show inherited

## Constructors

`public PdfRewritePreservationMatrixScenario(string id, string operation, byte[] sourcePdf, Func<byte[], byte[]> rewrite)` [#](#constructor-ctor-string-string-byte-func-system-byte-system-byte)

[PdfRewritePreservationMatrixScenario.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L7)

Creates a rewrite-preservation matrix scenario.

Parameters

**id string required**

**operation string required**

**sourcePdf byte[] required**

**rewrite System.Func<byte[], byte[]> required**

## Methods

`public PdfRewritePreservationMatrixScenario WithSourceFeatures(params string[] features)` [#](#method-withsourcefeatures-string)

[PdfRewritePreservationMatrixScenario.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L50)

Adds source feature labels and returns this scenario for fluent setup.

Parameters

**features string[] required**

Returns

`PdfRewritePreservationMatrixScenario`

## 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 string Id { get; }` [#](#property-id)

[PdfRewritePreservationMatrixScenario.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L28)

Stable scenario id for reports and proof manifests.

`public string Operation { get; }` [#](#property-operation)

[PdfRewritePreservationMatrixScenario.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L31)

Human-readable operation name, such as MetadataUpdate or PageExtraction.

`public byte[] SourcePdf { get; }` [#](#property-sourcepdf)

[PdfRewritePreservationMatrixScenario.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L34)

Original PDF bytes used by the scenario.

`public Func<byte[], byte[]> Rewrite { get; }` [#](#property-rewrite)

[PdfRewritePreservationMatrixScenario.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L37)

Rewrite operation to execute against [PdfRewritePreservationMatrixScenario.SourcePdf](/api/pdf/officeimo-pdf-pdfrewritepreservationmatrixscenario/).

`public PdfRewritePreservationMatrixClassification ExpectedClassification { get; set; }` [#](#property-expectedclassification)

[PdfRewritePreservationMatrixScenario.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L40)

Expected matrix classification. Defaults to rewrite-safe.

`public PdfRewritePreservationOptions? PreservationOptions { get; set; }` [#](#property-preservationoptions)

[PdfRewritePreservationMatrixScenario.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L43)

Preservation options used when the rewrite completes.

`public IList<string> SourceFeatures { get; }` [#](#property-sourcefeatures)

[PdfRewritePreservationMatrixScenario.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Manipulation/PdfRewritePreservationMatrixScenario.cs#L46)

Feature labels describing the source fixture.

<!-- PowerForge markdown artifact sha256:C5F5332303EF796AC9D8161E377291A09915F0928082C9F7306820B902B9A0B1 -->
