# OfficeWorkflow

Creates fluent local document workflows over OfficeWorkflowRunner.

Class 

`OfficeIMO.Workflows`

**Namespace**

`OfficeIMO.Workflows`

**Assembly**

`OfficeIMO.Workflows`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Modifiers**

static

Creates fluent local document workflows over [OfficeWorkflowRunner](/api/workflows/officeimo-workflows-officeworkflowrunner/).

## Inheritance

- object
- OfficeWorkflow

Filter members 

Show inherited

## Methods

`public static OfficeWorkflowBuilder Compare(string inputPath, string comparisonPath)` [#](#method-compare-string-string)

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

Creates a PDF comparison workflow.

Parameters

**inputPath string required**

**comparisonPath string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder ConvertToPdfA(string inputPath, PdfAConversionOptions? options = null)` [#](#method-converttopdfa-string-officeimo-pdf-pdfaconversionoptions)

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

Creates a PDF/A copy with captured conversion settings, or the library defaults when options is null. Use [OfficeWorkflowBuilder.WithPdfPassword](/api/workflows/officeimo-workflows-officeworkflowbuilder/) with the owner password for an encrypted source.

Parameters

**inputPath string required**

**options OfficeIMO.Pdf.PdfAConversionOptions? = null optional**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder ExtractPages(string inputPath, params int[] pageNumbers)` [#](#method-extractpages-string-int32)

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

Creates a PDF extraction workflow preserving the supplied page order and repeats.

Parameters

**inputPath string required**

**pageNumbers int[] required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder Inspect(string inputPath)` [#](#method-inspect-string)

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

Creates a PDF inspection workflow.

Parameters

**inputPath string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder Optimize(string inputPath)` [#](#method-optimize-string)

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

Creates a lossless PDF optimization workflow.

Parameters

**inputPath string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder PlanRepair(string inputPath)` [#](#method-planrepair-string)

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

Creates a report-only PDF repair-planning workflow.

Parameters

**inputPath string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder ProtectPdf(string inputPath, PdfStandardEncryptionOptions encryption)` [#](#method-protectpdf-string-officeimo-pdf-pdfstandardencryptionoptions)

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

Creates a password-protected PDF copy using captured output settings.

Parameters

**inputPath string required**

**encryption OfficeIMO.Pdf.PdfStandardEncryptionOptions required**

Returns

`OfficeWorkflowBuilder`

`public static void RegisterConversions()` [#](#method-registerconversions)

[OfficeWorkflow.Registration.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflow.Registration.cs#L18)

Registers the additional Workflows conversion engines with OfficeConverter. Repeated calls reuse the same registrations.

`public static OfficeWorkflowBuilder RemovePdfProtection(string inputPath, string ownerPassword)` [#](#method-removepdfprotection-string-string)

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

Creates an unencrypted PDF copy with the current owner password.

Parameters

**inputPath string required**

**ownerPassword string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder Repair(string inputPath)` [#](#method-repair-string)

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

Creates a verified PDF repair workflow.

Parameters

**inputPath string required**

Returns

`OfficeWorkflowBuilder`

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

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

Runs an explicitly constructed request through the default local runner.

Parameters

**request OfficeIMO.Workflows.OfficeWorkflowRequest required**

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

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

Returns

`Task<OfficeWorkflowResult>`

`public static OfficeWorkflowBuilder Sanitize(string inputPath)` [#](#method-sanitize-string)

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

Creates a verified PDF sanitization workflow.

Parameters

**inputPath string required**

Returns

`OfficeWorkflowBuilder`

`public static OfficeWorkflowBuilder SignPdf(string inputPath, IPdfExternalSigner signer, PdfExternalSignatureOptions options, IPdfSignatureCryptographyProvider verifier)` [#](#method-signpdf-string-officeimo-pdf-ipdfexternalsigner-officeimo-pdf-pdfexternalsignatureoptions-officeimo-pdf-ipdfsignaturecryptographyprovider)

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

Creates a signed PDF copy with captured appearance settings and a caller-owned signer and verifier.

Parameters

**inputPath string required**

**signer OfficeIMO.Pdf.IPdfExternalSigner required**

**options OfficeIMO.Pdf.PdfExternalSignatureOptions required**

**verifier OfficeIMO.Pdf.IPdfSignatureCryptographyProvider 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:533388E2A9772B1EAD851BBAEF26C3F79D3D7A2EA87E7D5280A8568E90ACB09B -->
