---
title: "PdfContext"
description: "Namespace: Lacuna.Pki.Pdf"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfContext"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# PdfContext

**Namespace:** `Lacuna.Pki.Pdf`  
**Assembly:** `Lacuna.Pki`  
_Class_

```csharp
public class PdfContext : PdfMarker.Context, IDisposable
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → [`PdfMarker.Context`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context) → `PdfContext`

## Métodos

### `Create(byte[])`

Creates a previous context with the PDF which will be operated

```csharp
public static PdfContext Create(byte[] pdf)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `pdf` | [`byte[]`](https://learn.microsoft.com/dotnet/api/system.byte) | The PDF to operate with |

**Retorno**

[`PdfContext`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfContext)

---

### `Create(PadesSignature)`

Creates a PDF Context from a PDF PadesSignature

```csharp
public static PdfContext Create(PadesSignature pades)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `pades` | [`PadesSignature`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pades/PadesSignature) | The PadesSignature to get the PDF context from |

**Retorno**

[`PdfContext`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfContext)

---

### `Create(Stream)`

Creates a previous context with the PDF which will be operated

```csharp
public static PdfContext Create(Stream pdf)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `pdf` | [`Stream`](https://learn.microsoft.com/dotnet/api/system.io.stream) | The PDF to operate with |

**Retorno**

[`PdfContext`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfContext)

---

## Membros herdados

[`GetPageDimensions(int, PadesMeasurementUnits)`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#getpagedimensions-system-int32-lacuna-pki-pades-padesmeasurementunits), [`Dispose()`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#dispose), [`PagesCount`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#pagescount), [`PdfAStandard`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#pdfastandard), [`Metadata`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#metadata), [`HasFullPermissions`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#hasfullpermissions), [`SignatureFieldNames`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#signaturefieldnames), [`FormFields`](https://docs.lacunasoftware.com/api/Lacuna.Pki.Pdf/PdfMarker.Context#formfields), [`ToString()`](https://learn.microsoft.com/dotnet/api/system.object.tostring), [`Equals(object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)>), [`Equals(object, object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)>), [`ReferenceEquals(object, object)`](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [`GetHashCode()`](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [`GetType()`](https://learn.microsoft.com/dotnet/api/system.object.gettype), [`MemberwiseClone()`](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)
