# PdfExternalSignaturePreparation

Prepared PDF bytes and byte ranges for an external signing operation.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfExternalSignaturePreparation.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L74)

**Modifiers**

sealed

Prepared PDF bytes and byte ranges for an external signing operation.

## Inheritance

- object
- PdfExternalSignaturePreparation

## Usage

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

- Method [PdfDocumentSecurity.PrepareExternalSignature](/api/pdf/officeimo-pdf-pdfdocumentsecurity/#method-prepareexternalsignature-officeimo-pdf-pdfexternalsignatureoptions-threading-cancellationtoken)
- Property [PdfExternalSignatureCompletion.Preparation](/api/pdf/officeimo-pdf-pdfexternalsignaturecompletion/#property-preparation)
- Property [PdfExternalSignatureRequest.Preparation](/api/pdf/officeimo-pdf-pdfexternalsignaturerequest/#property-preparation)

Filter members 

Show inherited

## Methods

`public PdfDocument Complete(byte[] signatureContents, PdfLoadOptions? readOptions = null)` [#](#method-complete-byte-officeimo-pdf-pdfloadoptions)

[PdfExternalSignaturePreparation.cs:85](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L85)

Completes this in-memory preparation with detached CMS or timestamp bytes. The original read policy is preserved with budget for the generated signature revision.

Parameters

**signatureContents byte[] required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional**

Returns

`PdfDocument`

`public byte[] ComputeSha256Digest()` [#](#method-computesha256digest)

[PdfExternalSignaturePreparation.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L74)

Computes the SHA-256 digest of [PdfExternalSignaturePreparation.SignedContent](/api/pdf/officeimo-pdf-pdfexternalsignaturepreparation/) for external signing services.

Returns

`byte[]`

## 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 byte[] PreparedPdf { get; }` [#](#property-preparedpdf)

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

PDF bytes containing a patched /ByteRange and zero-filled reserved /Contents placeholder.

`public string FieldName { get; }` [#](#property-fieldname)

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

Name of the AcroForm signature field appended to the document.

`public string Filter { get; }` [#](#property-filter)

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

PDF signature filter emitted in the signature dictionary.

`public string SubFilter { get; }` [#](#property-subfilter)

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

PDF signature subfilter emitted in the signature dictionary.

`public PdfSignatureProfile Profile { get; }` [#](#property-profile)

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

Approval, certification, or document-timestamp profile prepared for signing.

`public IReadOnlyList<long> ByteRangeValues { get; }` [#](#property-byterangevalues)

[PdfExternalSignaturePreparation.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L49)

Four-value detached signature /ByteRange array.

`public int ContentsHexOffset { get; }` [#](#property-contentshexoffset)

[PdfExternalSignaturePreparation.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L52)

Offset of the first hex character inside the reserved /Contents value.

`public int ContentsHexLength { get; }` [#](#property-contentshexlength)

[PdfExternalSignaturePreparation.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L55)

Number of hex characters reserved inside /Contents.

`public int ReservedSignatureContentsBytes { get; }` [#](#property-reservedsignaturecontentsbytes)

[PdfExternalSignaturePreparation.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L58)

Number of raw signature bytes that can be injected into /Contents.

`public byte[] SignedContent { get; }` [#](#property-signedcontent)

[PdfExternalSignaturePreparation.cs:63](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Signatures/PdfExternalSignaturePreparation.cs#L63)

Bytes covered by the /ByteRange and intended for external digest/signing.

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