# OfficeWorkflowBuilder

Fluent configuration for one local document workflow.

Class 

`OfficeIMO.Workflows`

**Namespace**

`OfficeIMO.Workflows`

**Assembly**

`OfficeIMO.Workflows`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeWorkflow.cs:93](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L93)

**Modifiers**

sealed

Fluent configuration for one local document workflow.

## Inheritance

- object
- OfficeWorkflowBuilder

## Usage

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

- Method [OfficeWorkflow.Compare](/api/workflows/officeimo-workflows-officeworkflow/#method-compare-string-string)
- Method [OfficeWorkflow.ConvertToPdfA](/api/workflows/officeimo-workflows-officeworkflow/#method-converttopdfa-string-officeimo-pdf-pdfaconversionoptions)
- Method [OfficeWorkflow.ExtractPages](/api/workflows/officeimo-workflows-officeworkflow/#method-extractpages-string-int32)
- Method [OfficeWorkflow.Inspect](/api/workflows/officeimo-workflows-officeworkflow/#method-inspect-string)
- Method [OfficeWorkflow.Optimize](/api/workflows/officeimo-workflows-officeworkflow/#method-optimize-string)
- Method [OfficeWorkflow.PlanRepair](/api/workflows/officeimo-workflows-officeworkflow/#method-planrepair-string)
- Method [OfficeWorkflow.ProtectPdf](/api/workflows/officeimo-workflows-officeworkflow/#method-protectpdf-string-officeimo-pdf-pdfstandardencryptionoptions)
- Method [OfficeWorkflow.RemovePdfProtection](/api/workflows/officeimo-workflows-officeworkflow/#method-removepdfprotection-string-string)
- Method [OfficeWorkflow.Repair](/api/workflows/officeimo-workflows-officeworkflow/#method-repair-string)
- Method [OfficeWorkflow.Sanitize](/api/workflows/officeimo-workflows-officeworkflow/#method-sanitize-string)
- Method [OfficeWorkflow.SignPdf](/api/workflows/officeimo-workflows-officeworkflow/#method-signpdf-string-officeimo-pdf-ipdfexternalsigner-officeimo-pdf-pdfexternalsignatureoptions-officeimo-pdf-ipdfsignaturecryptographyprovider)
- Method [OfficeWorkflowBuilder.Against](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-against-string)
- Method [OfficeWorkflowBuilder.ComparePages](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-comparepages-officeimo-officepageselector-officeimo-officepageselector)
- Method [OfficeWorkflowBuilder.OnConflict](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-onconflict-officeimo-officepublicationpolicy)
- Method [OfficeWorkflowBuilder.To](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-to-string)
- Method [OfficeWorkflowBuilder.WithComparisonPdfPassword](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withcomparisonpdfpassword-string)
- Method [OfficeWorkflowBuilder.WithId](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withid-string)
- Method [OfficeWorkflowBuilder.WithLimits](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withlimits-int64-int64)
- Method [OfficeWorkflowBuilder.WithPdfOwnerPassword](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withpdfownerpassword-string)
- Method [OfficeWorkflowBuilder.WithPdfPassword](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withpdfpassword-string)
- Method [OfficeWorkflowBuilder.WithProfile](/api/workflows/officeimo-workflows-officeworkflowbuilder/#method-withprofile-officeimo-officeconversionprofile)

Filter members 

Show inherited

## Methods

`public OfficeWorkflowBuilder Against(string comparisonPath)` [#](#method-against-string)

[OfficeWorkflow.cs:100](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L100)

Sets the comparison input for a compare workflow.

Parameters

**comparisonPath string required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowRequest Build()` [#](#method-build)

[OfficeWorkflow.cs:165](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L165)

Builds an independent request snapshot, inferring a locally executable conversion route from file extensions when possible.

Returns

`OfficeWorkflowRequest`

`public OfficeWorkflowBuilder ComparePages(OfficePageSelector? expectedPages, OfficePageSelector? actualPages)` [#](#method-comparepages-officeimo-officepageselector-officeimo-officepageselector)

[OfficeWorkflow.cs:157](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L157)

Selects independently ordered page scopes for ordinal rendered comparison. Null selects all pages on that side.

Parameters

**expectedPages OfficeIMO.OfficePageSelector? required**

**actualPages OfficeIMO.OfficePageSelector? required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder OnConflict(OfficePublicationPolicy policy)` [#](#method-onconflict-officeimo-officepublicationpolicy)

[OfficeWorkflow.cs:115](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L115)

Sets destination conflict behavior.

Parameters

**policy OfficeIMO.OfficePublicationPolicy required**

Returns

`OfficeWorkflowBuilder`

`public Task<OfficeWorkflowResult> RunAsync(IOfficeWorkflowRunner? runner = null, IProgress<OfficeWorkflowProgress>? progress = null, CancellationToken cancellationToken = default)` [#](#method-runasync-officeimo-workflows-iofficeworkflowrunner-iprogress-officeimo-workflows-officeworkflowprogress-threading-cancellationtoken)

[OfficeWorkflow.cs:201](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L201)

Runs this workflow through the supplied runner or the default local runner.

Parameters

**runner OfficeIMO.Workflows.IOfficeWorkflowRunner? = null optional**

**progress System.IProgress<OfficeIMO.Workflows.OfficeWorkflowProgress>? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OfficeWorkflowResult>`

`public OfficeWorkflowBuilder To(string outputPath)` [#](#method-to-string)

[OfficeWorkflow.cs:93](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L93)

Sets the output artifact path.

Parameters

**outputPath string required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithComparisonPdfPassword(string? password)` [#](#method-withcomparisonpdfpassword-string)

[OfficeWorkflow.cs:135](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L135)

Sets the PDF password used for the comparison input.

Parameters

**password string? required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithId(string id)` [#](#method-withid-string)

[OfficeWorkflow.cs:150](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L150)

Sets the caller-visible request identifier.

Parameters

**id string required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithLimits(long maximumInputBytes, long maximumOutputBytes)` [#](#method-withlimits-int64-int64)

[OfficeWorkflow.cs:141](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L141)

Sets bounded input and output sizes for the workflow.

Parameters

**maximumInputBytes long required**

**maximumOutputBytes long required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithPdfOwnerPassword(string? password)` [#](#method-withpdfownerpassword-string)

[OfficeWorkflow.cs:127](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L127)

Sets current owner authorization for replacing or removing PDF protection.

Parameters

**password string? required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithPdfPassword(string? password)` [#](#method-withpdfpassword-string)

[OfficeWorkflow.cs:121](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L121)

Sets the PDF password used for the primary input.

Parameters

**password string? required**

Returns

`OfficeWorkflowBuilder`

`public OfficeWorkflowBuilder WithProfile(OfficeConversionProfile profile)` [#](#method-withprofile-officeimo-officeconversionprofile)

[OfficeWorkflow.cs:107](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.cs#L107)

Sets the cross-format output profile.

Parameters

**profile OfficeIMO.OfficeConversionProfile required**

Returns

`OfficeWorkflowBuilder`

## 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?`

<!-- PowerForge markdown artifact sha256:53E683522795DAC3EB61913FCB545CF63B2B1F968E0230FD98E8873B6346292D -->
