# Page.GetImage Method

> Gets an image of the page's contents.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 15.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > Page.GetImage Method
- **1217 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/getimage-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/getimage-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/getimage-method/llms-full.txt

---

### Description

Gets an image of the page's contents.

### Syntax

#### GetImage(Page.PageContent)

Gets an image of the page's contents as an enhanced metafile.

```csharp
public Metafile GetImage(Page.PageContent contents);
```

```vbnet
Public Function GetImage(contents As Page.PageContent) As Metafile
```

| Parameter | Description |
|---|---|
| contents | Specifies the image's contents. It can be one or more of the values of the [PageContent](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagecontent/enumeration/llms-full.txt) enumeration. |

#### GetImage(int, Page.PageContent)

Gets an image of the page's contents as a bitmap in screen resolution.

```csharp
public Bitmap GetImage(int zoomFactor, Page.PageContent contents);
```

```vbnet
Public Function GetImage(zoomFactor As Integer, contents As Page.PageContent) As Bitmap
```

| Parameter | Description |
|---|---|
| zoomFactor | Specifies a zooming factor in percent. |
| contents | Specifies the image's contents. It can be one or more of the values of the [PageContent](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagecontent/enumeration/llms-full.txt) enumeration. |

#### GetImage(Page.PageContent, int)

Gets an image of the page's contents as a string in Scalable Vector Graphics (SVG) format. All characters are contained with outline curve data that are cubic Bézier splines. Curve and line data coordinates are in twentieth of a point (twips). Images of all pixel-formats are embedded in Portable Network Graphics (PNG) format.

```csharp
public string GetImage(Page.PageContent contents, int iMaxImageResolution);
```

```vbnet
Public Function GetImage(contents As Page.PageContent, iMaxImageResolution As Integer) As String
```

| Parameter | Description |
|---|---|
| contents | Specifies the image's contents. It can be one or more of the values of the [PageContent](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/pagecontent/enumeration/llms-full.txt) enumeration. |
| iMaxImageResolution | Specifies a maximum resolution value, in dots per inch, for images in pixel-formats. All of these images are embedded in Portable Network Graphics (PNG) format. |

### Examples

The following example works with the first laid-out page of a short report by using `Page.GetImage`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
Page page = textControl.GetPages()[1];

var result = page.GetImage(Page.PageContent.Background, 10);
Console.WriteLine($"Get Image result: {result}");

page.Select();
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
Dim page As Page = textControl.GetPages().Item(1)

Dim result = page.GetImage(Page.PageContent.Background, 10)
Console.WriteLine($"Get Image result: {result}")

page.Select()
```

### Remarks

When an SVG is added to the TextControl's [ImageCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/imagecollection/llms-full.txt), its original content is embedded unchanged in the SVG created with the GetImage method. This includes all script data that was part of the added SVG image.

---

## Nearby

- **Previous:** [Page.Footer Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/footer-property/llms-full.txt)
- **Next:** [Page.Header Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/page/header-property/llms-full.txt)
