# Contents.Lines Constructor

> Initializes a new DocumentServer.PDF.Contents.Lines class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 29.0
- **Namespace:** `TXTextControl.DocumentServer.PDF.Contents`
- **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 > Contents.Lines Constructor
- **649 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/constructor/llms-full.txt

---

### Description

Initializes a new [DocumentServer.PDF.Contents.Lines](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/llms-full.txt) class.

### Syntax

#### Lines(string)

Initializes a new [DocumentServer.PDF.Contents.Lines](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/llms-full.txt) class from a given file.

```csharp
public Lines(string filename);
```

```vbnet
Public Sub New(filename As String)
```

| Parameter | Description |
|---|---|
| filename | Specifies the PDF filename that is used to import the text lines. |

#### Lines(byte\[\])

 Initializes a new [DocumentServer.PDF.Contents.Lines](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/llms-full.txt) class from a given byte array.

```csharp
public Lines(byte[] data);
```

```vbnet
Public Sub New(data As Byte())
```

| Parameter | Description |
|---|---|
| data | Specifies data of a PDF document that is used to import the text lines. |

### Examples

The following example creates a Lines instance for a document-processing operation. The created object is then available to the surrounding document workflow.

```csharp
TXTextControl.DocumentServer.PDF.Contents.Lines lines = new("document.docx");
Console.WriteLine("Lines is ready for use.");
```

```vbnet
Dim lines As New TXTextControl.DocumentServer.PDF.Contents.Lines("document.docx")
Console.WriteLine("Lines is ready for use.")
```

---

## Nearby

- **Previous:** [Contents.Lines Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/llms-full.txt)
- **Next:** [Contents.Lines.ContentLines Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-pdf/contents-lines/contentlines-property/llms-full.txt)
