# PdfAttachmentInfo

Lightweight metadata for an embedded or associated PDF file attachment without exposing the attachment payload.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfAttachmentInfo.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L39)

**Modifiers**

sealed

Lightweight metadata for an embedded or associated PDF file attachment without exposing the attachment payload.

## Inheritance

- object
- PdfAttachmentInfo

## Usage

Explore 16 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 13

- Method [PdfDocumentInfo.GetAttachmentsByFileName](/api/pdf/officeimo-pdf-pdfdocumentinfo/#method-getattachmentsbyfilename-string)
- Method [PdfDocumentInfo.GetAttachmentsByName](/api/pdf/officeimo-pdf-pdfdocumentinfo/#method-getattachmentsbyname-string)
- Method [PdfDocumentInfo.GetAttachmentsByRelationship](/api/pdf/officeimo-pdf-pdfdocumentinfo/#method-getattachmentsbyrelationship-officeimo-pdf-pdfassociatedfilerelationship)
- Method [PdfDocumentInfo.GetAttachmentsBySource](/api/pdf/officeimo-pdf-pdfdocumentinfo/#method-getattachmentsbysource-string)
- Property [PdfDocumentInfo.Attachments](/api/pdf/officeimo-pdf-pdfdocumentinfo/#property-attachments)
- Property [PdfDocumentInfo.AttachmentsByFileName](/api/pdf/officeimo-pdf-pdfdocumentinfo/#property-attachmentsbyfilename)
- Property [PdfDocumentInfo.AttachmentsByName](/api/pdf/officeimo-pdf-pdfdocumentinfo/#property-attachmentsbyname)
- Property [PdfDocumentInfo.AttachmentsByRelationship](/api/pdf/officeimo-pdf-pdfdocumentinfo/#property-attachmentsbyrelationship)
- Property [PdfDocumentInfo.AttachmentsBySource](/api/pdf/officeimo-pdf-pdfdocumentinfo/#property-attachmentsbysource)
- Method [PdfDocumentReadResult.GetAttachmentsByFileName](/api/pdf/officeimo-pdf-pdfdocumentreadresult/#method-getattachmentsbyfilename-string)
- Method [PdfDocumentReadResult.GetAttachmentsByRelationship](/api/pdf/officeimo-pdf-pdfdocumentreadresult/#method-getattachmentsbyrelationship-officeimo-pdf-pdfassociatedfilerelationship)
- Method [PdfDocumentReadResult.GetAttachmentsBySource](/api/pdf/officeimo-pdf-pdfdocumentreadresult/#method-getattachmentsbysource-string)
- Property [PdfDocumentReadResult.Attachments](/api/pdf/officeimo-pdf-pdfdocumentreadresult/#property-attachments)

### Accepted by parameters 3

- Method [PdfAttachmentEditSession.Remove](/api/pdf/officeimo-pdf-pdfattachmenteditsession/#method-remove-officeimo-pdf-pdfattachmentinfo) parameter `attachment`
- Method [PdfDocumentAttachments.Extract](/api/pdf/officeimo-pdf-pdfdocumentattachments/#method-extract-officeimo-pdf-pdfattachmentinfo-int64-threading-cancellationtoken) parameter `attachment`
- Method [PdfDocumentAttachments.Remove](/api/pdf/officeimo-pdf-pdfdocumentattachments/#method-remove-officeimo-pdf-pdfattachmentinfo) parameter `attachment`

Filter members 

Show inherited

## 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 Name { get; }` [#](#property-name)

[PdfAttachmentInfo.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L39)

Name-tree key or associated-file fallback name for this attachment.

`public string FileName { get; }` [#](#property-filename)

[PdfAttachmentInfo.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L42)

File name from the file specification dictionary.

`public string? UnicodeFileName { get; }` [#](#property-unicodefilename)

[PdfAttachmentInfo.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L45)

Unicode file name from /UF, when present.

`public string? Description { get; }` [#](#property-description)

[PdfAttachmentInfo.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L48)

Human-readable file description from /Desc, when present.

`public string? MimeType { get; }` [#](#property-mimetype)

[PdfAttachmentInfo.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L51)

MIME type decoded from the embedded file stream /Subtype name, when present.

`public PdfAssociatedFileRelationship Relationship { get; }` [#](#property-relationship)

[PdfAttachmentInfo.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L54)

Associated-file relationship from /AFRelationship, or Unspecified when absent.

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

[PdfAttachmentInfo.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L57)

PDF stream filter name or comma-separated filter names when present.

`public int FileSpecObjectNumber { get; }` [#](#property-filespecobjectnumber)

[PdfAttachmentInfo.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L60)

Object number of the file specification dictionary, or 0 for a direct dictionary.

`public int EmbeddedFileObjectNumber { get; }` [#](#property-embeddedfileobjectnumber)

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

Object number of the embedded file stream, or 0 for a direct stream.

`public int SizeBytes { get; }` [#](#property-sizebytes)

[PdfAttachmentInfo.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L69)

Encoded attachment stream size in bytes. This is a compatibility alias for [PdfAttachmentInfo.EncodedSizeBytes](/api/pdf/officeimo-pdf-pdfattachmentinfo/); it is not the decoded attachment size when stream filters are present.

`public int EncodedSizeBytes { get; }` [#](#property-encodedsizebytes)

[PdfAttachmentInfo.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L72)

Exact encoded attachment stream size stored in the PDF.

`public int? DeclaredSizeBytes { get; }` [#](#property-declaredsizebytes)

[PdfAttachmentInfo.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L78)

Untrusted decoded-size claim from the embedded-file /Params /Size entry, when present. Callers must not use this value as a resource limit.

`public int? DecodedSizeBytes { get; }` [#](#property-decodedsizebytes)

[PdfAttachmentInfo.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L84)

Decoded attachment size is unknown during metadata-only inspection. Extract the attachment under [PdfReadLimits.MaxTotalAttachmentBytes](/api/pdf/officeimo-pdf-pdfreadlimits/) and inspect its payload length when the exact value is required.

`public string Source { get; }` [#](#property-source)

[PdfAttachmentInfo.cs:87](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L87)

Catalog source that referenced this attachment, for example Names/EmbeddedFiles or AF.

`public DateTimeOffset? CreationDate { get; }` [#](#property-creationdate)

[PdfAttachmentInfo.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L89)

Embedded-file creation date, when readable.

`public DateTimeOffset? ModificationDate { get; }` [#](#property-modificationdate)

[PdfAttachmentInfo.cs:91](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L91)

Embedded-file modification date, when readable.

`public bool IsAssociatedFile { get; }` [#](#property-isassociatedfile)

[PdfAttachmentInfo.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Model/PdfAttachmentInfo.cs#L94)

True when the attachment was referenced from the catalog /AF associated-files array.

<!-- PowerForge markdown artifact sha256:18196D9E477B3B24E56E9FDC1CA8FDD348F82C655409FB54C79936A0AD61479A -->
