---
title: "PdfEditor"
canonical_url: "https://www.nutrient.io/api/csharp/editors/pdf-editor/"
md_url: "https://www.nutrient.io/api/csharp/editors/pdf-editor.md"
last_updated: "2026-10-08T08:55:57.709Z"
description: "Provides specialized editing capabilities for PDF documents. Implements document and page-based editing operations specific to PDF format."
---

Provides specialized editing capabilities for PDF documents. Implements document and page-based editing operations specific to PDF format.

```csharp

using Nutrient;

```

The SDK creates this class through factory methods or other SDK objects.

## Properties

### FormFieldCollection

```csharp

public PdfFormFieldCollection FormFieldCollection { get; }

```

The collection of form fields in the PDF document.

**Type:** [`PdfFormFieldCollection`](/api/csharp/editors/pdf/formfields/pdf-form-field-collection/)

### Metadata

```csharp

public PdfMetadata Metadata { get; }

```

The metadata associated with the current PDF document.

**Type:** [`PdfMetadata`](/api/csharp/editors/pdf/pages/pdf-metadata/)

### PageCollection

```csharp

public PdfPageCollection PageCollection { get; }

```

The collection of pages in the PDF document.

**Type:** [`PdfPageCollection`](/api/csharp/editors/pdf/pages/pdf-page-collection/)

## Methods

### AppendDocument

```csharp

public void AppendDocument(Document document)

```

Appends all pages from another document to the end of the current PDF document.

**Parameters**

| Name       | Type                                | Description                                         |
| ---------- | ----------------------------------- | --------------------------------------------------- |
| `document` | [`Document`](/api/csharp/document/) | The document to append to the current PDF document. |

### DetectAndAddFormFields

```csharp

public void DetectAndAddFormFields()

```

Detects form fields on every page of the document and adds matching interactive form fields to the PDF. Detection uses the Vision form pipeline; detected fields are converted into AcroForm form fields placed at the detected positions.

### Edit

```csharp

public static PdfEditor Edit(Document document)

```

Creates a new PdfEditor instance and begins editing the specified document.

**Parameters**

| Name       | Type                                | Description           |
| ---------- | ----------------------------------- | --------------------- |
| `document` | [`Document`](/api/csharp/document/) | The document to edit. |

**Returns:** [`PdfEditor`](/api/csharp/editors/pdf-editor/) - A new PdfEditor instance for editing the document.

### MakeSearchable

```csharp

public void MakeSearchable()

```

Runs OCR over every page in the document and writes an invisible, searchable text layer on top of the rendered page content.

### Save

```csharp

public void Save()

```

Saves the current changes made in the editor.

### SaveAs

```csharp

public void SaveAs(string path)

```

Saves the current changes to a file at the specified path.

**Parameters**

| Name   | Type     | Description                                     |
| ------ | -------- | ----------------------------------------------- |
| `path` | `string` | The file path where the document will be saved. |

```csharp

public void SaveAs(Stream stream)

```

Saves the current changes to the specified stream.

**Parameters**

| Name     | Type     | Description                                  |
| -------- | -------- | -------------------------------------------- |
| `stream` | `Stream` | The stream where the document will be saved. |

## Close

```csharp

public void Close()

```

Closes the document currently being edited. The editor remains usable.

## Resource management

```csharp

public void Dispose()

```

`PdfEditor` implements `IDisposable`. Call `Dispose()` or use a C# `using` declaration to release its native handle right away. If you don't, the handle is released when the object is garbage collected.

---

## Related pages

- [Editors](/api/csharp/editors.md)
- [Presentation Editor](/api/csharp/editors/presentation-editor.md)
- [Spreadsheet Editor](/api/csharp/editors/spreadsheet-editor.md)
- [Word Editor](/api/csharp/editors/word-editor.md)

