# EmbeddedFile.BinaryData Property

> If the file is a binary file, this property returns the binary data. If the file is not a binary file, this property returns null.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **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 > EmbeddedFile.BinaryData Property
- **324 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/embeddedfile/binarydata-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/embeddedfile/binarydata-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/embeddedfile/binarydata-property/llms-full.txt

---

### Description

If the file is a binary file, this property returns the binary data. If the file is not a binary file, this property returns null.

### Syntax

```csharp
public byte[] BinaryData { get; }
```

```vbnet
Public ReadOnly Property BinaryData As Byte()
```

### Examples

The following example iterates through the binary data collection and processes each byte.

```csharp
foreach (byte byteValue in embeddedFile.BinaryData)
{
    Console.WriteLine(byteValue);
}
```

```vbnet
For Each byteValue As Byte In embeddedFile.BinaryData
    Console.WriteLine(byteValue)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [EmbeddedFile Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/embeddedfile/llms-full.txt)
- **Next:** [EmbeddedFile.CreationDate Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/embeddedfile/creationdate-property/llms-full.txt)
