---
title: "Add a page to PDF or TIFF image in C# .NET | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/editor/add-page/"
md_url: "https://www.nutrient.io/guides/dotnet/editor/add-page.md"
last_updated: "2026-05-21T17:12:02.203Z"
description: "Learn how to add new pages to existing PDF documents or TIFF images in C# .NET using Nutrient .NET SDK. Extend and modify your multi-page files programmatically."
---

# Add a page to a PDF or a TIFF image in C# .NET

Nutrient.NET SDK (formerly GdPicture.NET) enables you to add pages to files that support pagination, such as PDFs and TIFF files.

## Adding a blank page to a PDF

To add a blank page to a PDF, use the [`InsertPage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~InsertPage.html) method. This method requires the page size and the page location where it’ll be inserted. The page size can be defined in one of the following ways:

- The page width and height in pixels.

- The `PdfPageSizes` enumeration with predefined values.

To add a square blank page of 500×500 pixels to the beginning and an A5 blank page to the end of a PDF file, use the following code:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Insert a square blank page at the beginning of the PDF.
gdpicturePDF.InsertPage(PdfPageSizes.PdfPageSizeA5, 1);
// Insert an A5 blank page at the end of the PDF.
gdpicturePDF.InsertPage(PageWidth: 500, PageHeight: 500,
    gdpicturePDF.GetPageCount());
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Insert a square blank page at the beginning of the PDF.
    gdpicturePDF.InsertPage(PdfPageSizes.PdfPageSizeA5, 1)
    ' Insert an A5 blank page at the end of the PDF.
    gdpicturePDF.InsertPage(PageWidth:=500, PageHeight:=500,
        gdpicturePDF.GetPageCount())
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`GetPageCount`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~GetPageCount.html)

- [`InsertPage`]

- [`LoadFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~LoadFromFile.html)

- [`SaveToFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SaveToFile.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Adding an existing page to a PDF

To add an existing page to the currently loaded PDF, use the [`ClonePage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~ClonePage.html) method. This method adds the copied page to the end of the file. For more information, refer to the [copying a PDF page](https://www.nutrient.io/guides/dotnet/editor/manipulation/move-or-copy-page.md#copying-a-pdf-page) section of the guide on moving and copying pages.

To place the copied page to a specific location after using the [`ClonePage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~ClonePage.html) method, use the [`MovePage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~MovePage.html) method to specify the final location of the copied page. For more information, refer to the section on [copying a PDF page to a specified location](https://www.nutrient.io/guides/dotnet/editor/manipulation/move-or-copy-page.md#copying-a-pdf-page-to-a-specified-location) in the guide on moving and copying pages.

## Adding a blank page to a TIFF

To add a blank page to a TIFF file, follow the steps outlined below.

1. Create a `GdPictureImaging` object.

2. [Create an empty GdPicture image](#creating-an-empty-image) by using the [`CreateNewGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging~CreateNewGdPictureImage.html) method.

3. Add the empty GdPicture image to the TIFF file in one of the following ways:
   - Append the image to the end of the TIFF file with the [`TiffAppendPageFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffAppendPageFromFile.html) method or the [`TiffAppendPageFromGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffAppendPageFromGdPictureImage.html) method.
   - Insert the image at the desired location with the [`TiffInsertPageFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffInsertPageFromFile.html) method or the [`TiffInsertPageFromGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffInsertPageFromGdPictureImage.html) method.

To insert an empty image into the second-to-last position of a TIFF image, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
Color backColor = Color.White;
int imageID = gdpictureImaging.TiffCreateMultiPageFromFile(@"C:\temp\source.tif");
// Create an empty image.
int imageBlankID = gdpictureImaging.CreateNewGdPictureImage(Width: 500, Height: 500,
    BitDepth: 32, BackColor: backColor);
// Insert the empty image into the second-to-last position of the TIFF image.
gdpictureImaging.TiffInsertPageFromGdPictureImage(imageID,
    gdpictureImaging.GetPageCount(imageID), imageBlankID);
gdpictureImaging.TiffSaveMultiPageToFile(imageID, @"C:\temp\output.tif",
    TiffCompression.TiffCompressionAUTO);
gdpictureImaging.ReleaseGdPictureImage(imageBlankID);
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim backColor As Color = Color.White
    Dim imageID As Integer = gdpictureImaging.TiffCreateMultiPageFromFile("C:\temp\source.tif")
    ' Create an empty image.
    Dim imageBlankID As Integer = gdpictureImaging.CreateNewGdPictureImage(Width:=500, Height:=500,
        BitDepth:=32, BackColor:=backColor)
    ' Insert the empty image into the second-to-last position of the TIFF image.
    gdpictureImaging.TiffInsertPageFromGdPictureImage(imageID,
        gdpictureImaging.GetPageCount(imageID), imageBlankID)
    gdpictureImaging.TiffSaveMultiPageToFile(imageID, "C:\temp\output.tif",
        TiffCompression.TiffCompressionAUTO)
    gdpictureImaging.ReleaseGdPictureImage(imageBlankID)
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

The `GetPageCount` method returns the number of pages of the TIFF image after executing the `TiffInsertPageFromGdPictureImage` method. This means that the last page is `GetPageCount + 1`, and the second-to-last page is `GetPageCount`.

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`GetPageCount`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~GetPageCount.html)

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`TiffCreateMultiPageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffCreateMultiPageFromFile.html)

- [`TiffInsertPageFromGdPictureImage`]

- [`TiffSaveMultiPageToFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffSaveMultiPageToFile.html)

### Creating an empty image

The [`CreateNewGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPictureImaging~CreateNewGdPictureImage.html) method enables you to create an empty image. It requires the following parameters:

- `Width` — Sets the image width in pixels.

- `Height` — Sets the image height in pixels.

- `BitDepth` or `PixelFormat` — Sets the image bit depth or the `PixelFormat` enumeration defining the pixel format.

- `BackColor` — Sets the image background color defined by either the [`Color`](https://www.nutrient.io/guides/dotnet/editor/manipulation/colors/#color-object) object or using the [`ARGB`](https://www.nutrient.io/guides/dotnet/editor/manipulation/colors/#argb-method) method.

Use the following code to create an empty image:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
Color backColor = Color.White;
// Create an empty image with a white background and the size of 500×500 pixels.
int imageID = gdpictureImaging.CreateNewGdPictureImage(Width: 500, Height: 500, BitDepth: 32, BackColor: backColor);
gdpictureImaging.SaveAsJPEG(imageID, @"C:\temp\output.jpg");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim backColor As Color = Color.White
    ' Create an empty image with a white background and the size of 500×500 pixels.
    Dim imageID As Integer = gdpictureImaging.CreateNewGdPictureImage(Width:=500, Height:=500, BitDepth:=32, BackColor:=backColor)
    gdpictureImaging.SaveAsJPEG(imageID, "C:\temp\output.jpg")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateNewGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateNewGdPictureImage.html)

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsJPEG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsJPEG.html)

## Adding an existing page to a TIFF

To add an existing page to a TIFF image, follow the steps outlined below.

1. Create a `GdPictureImaging` object.

2. Extract the page you want to add with the [`TiffExtractPage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffExtractPage.html) method.

3. Add the extracted page to the TIFF image in one of the following ways:
   - Append the image to the end of the TIFF file with the [`TiffAppendPageFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffAppendPageFromFile.html) method or the [`TiffAppendPageFromGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffAppendPageFromGdPictureImage.html) method.
   - Insert the image at the desired location with the [`TiffInsertPageFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffInsertPageFromFile.html) method or the [`TiffInsertPageFromGdPictureImage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffInsertPageFromGdPictureImage.html) method.

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int tiffID = gdpictureImaging.TiffCreateMultiPageFromFile("C:\temp\source.tif");
// Extract the last TIFF page to a temp.jpg file.
gdpictureImaging.TiffExtractPage(tiffID, gdpictureImaging.GetPageCount(tiffID),
    @"C:\temp\temp.jpg");
// Open a GdPicture image from the temp.jpg file.
int imageTempID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\temp.jpg");
// Append the GdPicture image to the TIFF file.
gdpictureImaging.TiffAppendPageFromFile(tiffID, @"C:\temp\temp.jpg");
gdpictureImaging.TiffSaveMultiPageToFile(tiffID, @"C:\temp\output.tif",
    TiffCompression.TiffCompressionAUTO);
gdpictureImaging.ReleaseGdPictureImage(imageTempID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim tiffID As Integer = gdpictureImaging.TiffCreateMultiPageFromFile("C:\temp\source.tif")
    ' Extract the last TIFF page to a temp.jpg file.
    gdpictureImaging.TiffExtractPage(tiffID, gdpictureImaging.GetPageCount(tiffID),
        "C:\temp\temp.jpg")
    ' Open a GdPicture image from the temp.jpg file.
    Dim imageTempID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\temp.jpg")
    ' Append the GdPicture image to the TIFF file.
    gdpictureImaging.TiffAppendPageFromFile(tiffID, "C:\temp\temp.jpg")
    gdpictureImaging.TiffSaveMultiPageToFile(tiffID, "C:\temp\output.tif",
        TiffCompression.TiffCompressionAUTO)
    gdpictureImaging.ReleaseGdPictureImage(imageTempID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`GetPageCount`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~GetPageCount.html)

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`TiffAppendPageFromFile`]

- [`TiffCreateMultiPageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffCreateMultiPageFromFile.html)

- [`TiffExtractPage`]

- [`TiffSaveMultiPageToFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~TiffSaveMultiPageToFile.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)
---

## Related pages

- [Add an image to a PDF using C#](/guides/dotnet/editor/add-image-to-pdf.md)
- [Add text to an image using C#](/guides/dotnet/editor/add-text-to-image.md)
- [Attach a file to a PDF in C#](/guides/dotnet/editor/attach-a-file.md)
- [PDF and image editor in C#.NET](/guides/dotnet/editor.md)
- [Add text to PDFs in C#](/guides/dotnet/editor/add-text-to-pdf.md)
- [Add an image to another image using C#](/guides/dotnet/editor/add-image-to-image.md)
- [Merge PDFs in C#](/guides/dotnet/editor/merge-or-combine.md)
- [Modify EXIF metadata using C#](/guides/dotnet/editor/metadata-exif.md)
- [Edit IPTC metadata using C#](/guides/dotnet/editor/metadata-iptc.md)
- [Read and edit PDF page label metadata using C#](/guides/dotnet/editor/metadata-pdf-page-label.md)
- [Read and edit PDF XMP metadata using C#](/guides/dotnet/editor/metadata-xmp.md)
- [Split PDF pages into multiple pages in C#](/guides/dotnet/editor/split.md)
- [Add watermarks to PDFs and images in C#](/guides/dotnet/editor/watermark.md)

