# PdfEmbeddedFile

Describes a file embedded in a generated PDF and associated with the document catalog or a canvas structure element.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfEmbeddedFile.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L16)

**Modifiers**

sealed

Describes a file embedded in a generated PDF and associated with the document catalog or a canvas structure element.

## Inheritance

- object
- PdfEmbeddedFile

## Usage

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

- Property [PdfAttachmentEditSession.Attachments](/api/pdf/officeimo-pdf-pdfattachmenteditsession/#property-attachments)
- Property [PdfCanvasStructureOptions.AssociatedFiles](/api/pdf/officeimo-pdf-pdfcanvasstructureoptions/#property-associatedfiles)
- Property [PdfCreateOptions.EmbeddedFiles](/api/pdf/officeimo-pdf-pdfcreateoptions/#property-embeddedfiles)

### Accepted by parameters 6

- Method [PdfAttachmentEditSession.Add](/api/pdf/officeimo-pdf-pdfattachmenteditsession/#method-add-officeimo-pdf-pdfembeddedfile) parameter `attachment`
- Method [PdfAttachmentEditSession.Replace](/api/pdf/officeimo-pdf-pdfattachmenteditsession/#method-replace-string-officeimo-pdf-pdfembeddedfile) parameter `replacement`
- Method [PdfCanvasStructureOptions.AddAssociatedFile](/api/pdf/officeimo-pdf-pdfcanvasstructureoptions/#method-addassociatedfile-officeimo-pdf-pdfembeddedfile) parameter `file`
- Method [PdfCreateOptions.AddEmbeddedFile](/api/pdf/officeimo-pdf-pdfcreateoptions/#method-addembeddedfile-officeimo-pdf-pdfembeddedfile) parameter `file`
- Method [PdfDocumentAttachments.Add](/api/pdf/officeimo-pdf-pdfdocumentattachments/#method-add-officeimo-pdf-pdfembeddedfile) parameter `attachment`
- Method [PdfDocumentAttachments.Replace](/api/pdf/officeimo-pdf-pdfdocumentattachments/#method-replace-string-officeimo-pdf-pdfembeddedfile) parameter `replacement`

Filter members 

Show inherited

## Constructors

`public PdfEmbeddedFile(string fileName, byte[] data, string? mimeType = null, PdfAssociatedFileRelationship relationship = Unspecified, string? description = null, DateTimeOffset? creationDate = null, DateTimeOffset? modificationDate = null)` [#](#constructor-ctor-string-byte-string-officeimo-pdf-pdfassociatedfilerelationship-string-nullable-system-datetimeoffset-nullable-system-datetimeoffset)

[PdfEmbeddedFile.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L16)

Creates a PDF embedded file description.

Parameters

**fileName string required**

**data byte[] required**

**mimeType string? = null optional**

**relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship = Unspecified optional**

**description string? = null optional**

**creationDate System.DateTimeOffset? = null optional**

**modificationDate System.DateTimeOffset? = null optional**

## 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 FileName { get; set; }` [#](#property-filename)

[PdfEmbeddedFile.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L41)

Embedded file name as exposed in the PDF name tree.

`public byte[] Data { get; }` [#](#property-data)

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

Embedded file bytes. The returned array is a defensive copy.

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

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

Optional MIME type, for example "application/xml".

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

[PdfEmbeddedFile.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L67)

Associated-file relationship emitted as /AFRelationship.

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

[PdfEmbeddedFile.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L76)

Optional human-readable file description.

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

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

Optional embedded-file creation date.

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

[PdfEmbeddedFile.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfEmbeddedFile.cs#L86)

Optional embedded-file modification date.

<!-- PowerForge markdown artifact sha256:3E51079B850722BBFB2C3F2C58EF34495DAB4171A9E6801D6FFFE624071DC333 -->
