# Attachments Class

> The Attachments class provides methods to extract embedded files from a PDF document.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.DocumentServer.PDF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.DocumentServer.PDF > Attachments Class
- **591 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/llms-full.txt

---

### Description

The Attachments class provides methods to extract embedded files from a PDF document.

### Syntax

```csharp
public static class Attachments
```

```vbnet
Public Module Attachments
```

### Examples

The following example uses `Attachments.GetFromFile` in a document-processing workflow.

```csharp
TXTextControl.DocumentServer.PDF.EmbeddedFile[] results = TXTextControl.DocumentServer.PDF.Attachments.GetFromFile("document.docx");
foreach (TXTextControl.DocumentServer.PDF.EmbeddedFile embeddedFile in results)
{
    Console.WriteLine(embeddedFile);
}
```

```vbnet
Dim results As TXTextControl.DocumentServer.PDF.EmbeddedFile() = TXTextControl.DocumentServer.PDF.Attachments.GetFromFile("document.docx")
For Each embeddedFile As TXTextControl.DocumentServer.PDF.EmbeddedFile In results
    Console.WriteLine(embeddedFile)
Next
```

---

## In This Section

- [Attachments.GetFromData Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/getfromdata-method/llms-full.txt): Returns an array of EmbeddedFile objects that represent all embedded files in the provided PDF document data.
- [Attachments.GetFromFile Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/getfromfile-method/llms-full.txt): Returns an array of EmbeddedFile objects that represent all embedded files in the specified PDF document.

---

## Nearby

- **Previous:** [AcroForms.FormTextField.Value Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/acroforms-formtextfield/value-property/llms-full.txt)
- **Next:** [Attachments.GetFromData Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/attachments/getfromdata-method/llms-full.txt)
