---
title: "Add text to PDF: Set font style, size, color | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/editor/add-text-to-pdf/"
md_url: "https://www.nutrient.io/guides/dotnet/editor/add-text-to-pdf.md"
last_updated: "2026-05-21T17:12:02.203Z"
description: "Learn how to add text to PDFs and images in C#. Follow our step-by-step guide for efficient solutions using C#."
---

# Add text to PDFs in C#

### PDF

[PDF](https://www.nutrient.io/guides/dotnet/editor/add-text-to-pdf.md)

### Image

[Image](https://www.nutrient.io/guides/dotnet/editor/add-text-to-image.md)

## Adding text to PDFs

The [`DrawText`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~DrawText.html) method allows you to add simple text to a PDF file. It requires the following parameters:

- `FontResName` — The font to be used.

- `DstX` — The horizontal distance between the coordinate origin and the lower-left corner of the text body.

- `DstY` — The vertical distance between the coordinate origin and the lower-left corner of the text body.

- `Text` — The body of the text.

To add text to a PDF file, follow the steps outlined below.

1. Create a `GdPicturePDF` object.

2. Load the PDF file with the [`LoadFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~LoadFromFile.html) method.

3. Set the origin of the coordinate system with the [`SetOrigin`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetOrigin.html) method. This method requires the `PdfOrigin` enumeration, which accepts the following values:

- `PdfOriginTopLeft`

- `PdfOriginTopRight`

- `PdfOriginBottomRight`

- `PdfOriginBottomLeft`

4. Set the [measurement unit](#measurement-unit), which is used to specify dimensions.

5. Specify which [font type](#font-type) to use.

6. Select the page where you want the text to be added with the [`SelectPage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SelectPage.html) method.

7. Optional: Set the [text size](#text-size) (`12pt` by default).

8. Optional: Specify the [text color](#text-color) (black by default).

To add pagination to a PDF file, use the following code:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Set the origin of the coordinate system to the bottom-right corner.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomRight);
// Set the measurement unit to centimeters.
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
// Specify the font type.
string fontName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold);
for (int i = 1; i <= gdpicturePDF.GetPageCount(); i++)
{
    // Select the PDF page.
    gdpicturePDF.SelectPage(i);
    // Set the text size to 16 pt.
    gdpicturePDF.SetTextSize(16);
    // Set the fill color to gray.
    gdpicturePDF.SetFillColor(128, 128, 128);
    // Draw the page number in the bottom-right corner.
    gdpicturePDF.DrawText(fontName, 1, 1, i.ToString());
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Set the origin of the coordinate system to the bottom-right corner.
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomRight)
    ' Set the measurement unit to centimeters.
    gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
    ' Specify the font type.
    Dim fontName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold)
    For i As Integer = 1 To gdpicturePDF.GetPageCount()
        ' Select the PDF page.
        gdpicturePDF.SelectPage(i)
        ' Set the text size to 16 pt.
        gdpicturePDF.SetTextSize(16)
        ' Set the fill color to gray.
        gdpicturePDF.SetFillColor(128, 128, 128)
        ' Draw the page number in the bottom-right corner.
        gdpicturePDF.DrawText(fontName, 1, 1, i.ToString())
    Next
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`AddStandardFont`]

- [`DrawText`]

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

- [`LoadFromFile`]

- [`SelectPage`]

- [`SetFillColor`]

- [`SetMeasurementUnit`]

- [`SetOrigin`]

- [`SetTextSize`]

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

## Adding text to PDFs at an angle

To add simple text to a PDF page at a specific angle, use the [`DrawRotatedText`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~DrawRotatedText.html) method. It accepts the same [`parameters`](#adding-text-to-pdfs) as the `DrawText` method, along with the `Angle` parameter. It specifies the counterclockwise angle (in degrees) at which the text is displayed.

To add text to the bottom-left corner at a 90-degree angle, use the following code:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Set the origin of the coordinate system to the bottom-left corner.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft);
// Set the measurement unit to centimeters.
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
// Specify the font type.
string fontName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold);
for (int i = 1; i <= gdpicturePDF.GetPageCount(); i++)
{
    // Select the PDF page.
    gdpicturePDF.SelectPage(i);
    // Set the text size to 10 pt.
    gdpicturePDF.SetTextSize(10);
    // Set the fill color to gray.
    gdpicturePDF.SetFillColor(128, 128, 128);
    // Draw the page number in the bottom-left corner.
    gdpicturePDF.DrawRotatedText(fontName, 1, 1, "Do not copy or scan this document.", 90);
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Set the origin of the coordinate system to the bottom-left corner.
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft)
    ' Set the measurement unit to centimeters.
    gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
    ' Specify the font type.
    Dim fontName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold)
    For i As Integer = 1 To gdpicturePDF.GetPageCount()
        ' Select the PDF page.
        gdpicturePDF.SelectPage(i)
        ' Set the text size to 10 pt.
        gdpicturePDF.SetTextSize(10)
        ' Set the fill color to gray.
        gdpicturePDF.SetFillColor(128, 128, 128)
        ' Draw the page number in the bottom-left corner.
        gdpicturePDF.DrawRotatedText(fontName, 1, 1, "Do not copy or scan this document.", 90)
    Next
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`AddStandardFont`]

- [`DrawRotatedText`]

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

- [`LoadFromFile`]

- [`SelectPage`]

- [`SetMeasurementUnit`]

- [`SetOrigin`]

- [`SetFillColor`]

- [`SetTextSize`]

- [`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 text boxes to PDFs

The [`DrawTextBox`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~DrawTextBox.html) method allows you to add text to a PDF file in the form of a text box. It supports multiline text inside the dimensions specified in the input parameters. If a part of your text isn’t visible, it means that the text box is too small to contain the entire text. This method requires the following parameters:

- `FontResName` — The font to be used.

- `Left` — The distance between the coordinate origin and the left side of the text box.

- `Top` — The distance between the coordinate origin and the top of the text box.

- `Right` — The distance between the coordinate origin and the right side of the text box.

- `Bottom`— The distance between the coordinate origin and the bottom of the text box.

- `HorizontalAlignment` — Specifies horizontal text alignment.

- `VerticalAlignment` — Specifies vertical text alignment.

- `Text` — The body of the text.

The `HorizontalAlignment` and `VerticalAlignment` parameters are defined by the `TextAlignment` enumeration, which accepts the following values:

- `TextAlignmentCenter` — Aligns text to the center.

- `TextAlignmentNear` — Aligns text to the left side in left-to-right writing systems. In right-to-left systems, it’s aligned to the right.

- `TextAlignmentFar` — Aligns text to the right side in left-to-right writing systems. In right-to-left systems, it’s aligned to the left.

To add a text box to a PDF file, follow the steps outlined below.

1. Create a `GdPicturePDF` object.

2. Load the PDF file with the [`LoadFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~LoadFromFile.html) method.

3. Set the origin of the coordinate system with the [`SetOrigin`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetOrigin.html) method. This method requires the `PdfMeasurement` enumeration, which accepts the following values:

- `PdfOriginTopLeft`

- `PdfOriginTopRight`

- `PdfOriginBottomRight`

- `PdfOriginBottomLeft`

4. Set the [measurement unit](#measurement-unit), which is used to specify dimensions.

5. Specify which [font type](#font-type) to use.

6. Select the page you want the text to be added to with the [`SelectPage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SelectPage.html) method.

7. Optional: Set the [text size](#text-size) (`12pt` by default).

8. Optional: Specify the [text color](#text-color) (black by default).

To add pagination to a PDF file, use the following code:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Set the origin of the coordinate system to the bottom-left corner.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft);
// Set the measurement unit to centimeters.
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
// Specify the font type.
string fontName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold);
for (int i = 1; i <= gdpicturePDF.GetPageCount(); i++)
{
    // Select the PDF page.
    gdpicturePDF.SelectPage(i);
    // Set the text size to 8 pt.
    gdpicturePDF.SetTextSize(8);
    // Set the fill color to gray.
    gdpicturePDF.SetFillColor(128, 128, 128);
    // Set the text alignment to center to a variable.
    var alignCenter = TextAlignment.TextAlignmentCenter;
    float pageWidth = gdpicturePDF.GetPageWidth();
    string multiline = "This Agreement supersedes any prior written or verbal communication or understanding." +
        "\nWe may change the terms of this Agreement at any time." +
        "\nAny later version of this document shall supersede all previous versions.";
    // Add the multiline text to the bottom of the page.
    gdpicturePDF.DrawTextBox(fontName, 1, 2, pageWidth - 1, 1, alignCenter, alignCenter, multiline);
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Set the origin of the coordinate system to the bottom-left corner.
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft)
    ' Set the measurement unit to centimeters.
    gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
    ' Specify the font type.
    Dim fontName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold)
    For i As Integer = 1 To gdpicturePDF.GetPageCount()
        ' Select the PDF page.
        gdpicturePDF.SelectPage(i)
        ' Set the text size to 8 pt.
        gdpicturePDF.SetTextSize(8)
        ' Set the fill color to gray.
        gdpicturePDF.SetFillColor(128, 128, 128)
        ' Set the text alignment to center to a variable.
        Dim alignCenter = TextAlignment.TextAlignmentCenter
        Dim pageWidth As Single = gdpicturePDF.GetPageWidth()
        Dim multiline = "This Agreement supersedes any prior written or verbal communication or understanding."
            & vbLf & "We may change the terms of this Agreement at any time."
            & vbLf & "Any later version of this document shall supersede all previous versions."
        ' Add the multiline text to the bottom of the page.
        gdpicturePDF.DrawTextBox(fontName, 1, 2, pageWidth - 1, 1, alignCenter, alignCenter, multiline)
    Next
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`AddStandardFont`]

- [`DrawTextBox`]

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

- [`LoadFromFile`]

- [`SelectPage`]

- [`SetMeasurementUnit`]

- [`SetOrigin`]

- [`SetFillColor`]

- [`SetTextSize`]

- [`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 wrapped text to PDFs

To automatically wrap the added text depending on the specified area dimensions, use the [`DrawWrappedText`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~DrawWrappedText.html) method. It accepts the following parameters:

- `FontResName` — The font to be used.

- `Left` — The distance between the coordinate origin and the left side of the text box.

- `Top`— The distance between the coordinate origin and the top of the text box.

- `Right` — The distance between the coordinate origin and the right side of the text box.

- `Bottom` — The distance between the coordinate origin and the bottom of the text box.

- `HorizontalAlignment` — Specifies horizontal text alignment.

- `Text` — The body of the text.

- `UseFontBBox` — A Boolean value to use the font boundary box when calculating the line height. The font boundary box is an imaginary box that encloses all glyphs from the font, usually as tight as possible. When `UseFontBBox` is set to `false`, the line height calculation uses the font’s ascent and descent properties. The ascent property is the distance from the baseline to the highest grid coordinate used to place an outline point. The descent property is the distance from the baseline to the lowest grid coordinate.

- `StartPos` — Counts both as an input and output parameter. As an input, it specifies the index of the first character of the string used as the text body. After using the `DrawWrappedText` method, this parameter holds the index of the first character that wasn’t drawn due to the specified area’s boundaries. If the entire text is placed in the specified dimensions, this parameter returns `-1`.

The `HorizontalAlignment` parameter is defined by the `TextAlignment` enumeration, which accepts the following values:

- `TextAlignmentCenter` — Aligns text to the center.

- `TextAlignmentNear` — Aligns text to the left side in left-to-right writing systems. In right-to-left systems, it’s aligned to the right.

- `TextAlignmentFar` — Aligns text to the right side in left-to-right writing systems. In right-to-left systems, it’s aligned to the left.

To add wrapped text to a PDF file, follow the steps outlined below.

1. Create a `GdPicturePDF` object.

2. Load the PDF file with the [`LoadFromFile`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~LoadFromFile.html) method.

3. Set the origin of the coordinate system with the [`SetOrigin`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetOrigin.html) method. This method requires the `PdfMeasurement` enumeration, which accepts the following values:

- `PdfOriginTopLeft`

- `PdfOriginTopRight`

- `PdfOriginBottomRight`

- `PdfOriginBottomLeft`

4. Set the [measurement unit](#measurement-unit), which is used to specify dimensions.

5. Specify which [font type](#font-type) to use.

6. Set the `StartPos` parameter to `0`.

7. Select the page you want the text to be added to with the [`SelectPage`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SelectPage.html) method.

8. Optional: Set the [text size](#text-size) (`12pt` by default).

9. Optional: Specify the [text color](#text-color) (black by default).

Use the `StartPos` parameter if you aren’t sure whether the text will fit in the PDF page dimensions. Before adding the final text to a page, you can draw a test text outside the page area and check if the long version of the text fits. If the `StartPos` parameter has a value different from `-1`, use the short version for this page. The code below demonstrates this situation:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Set the origin of the coordinate system to the bottom-left corner.
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft);
// Set the measurement unit to centimeters.
gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
// Specify the font type.
string fontName = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold);
// Set the `StartPos` parameter to `0`.
int StartPos = 0;
string shortMultiline = "This Agreement supersedes any prior written or " +
        "verbal communication or understanding.";
string multiline = "This Agreement supersedes any prior written or " +
    "verbal communication or understanding. " +
    "We may change the terms of this Agreement at any time. " +
    "Any later version of this document shall supersede all previous versions.";
for (int i = 1; i <= gdpicturePDF.GetPageCount(); i++)
{
    // Select the PDF page.
    gdpicturePDF.SelectPage(i);
    // Set the fill color to gray.
    gdpicturePDF.SetFillColor(128, 128, 128);
    float pageWidth = gdpicturePDF.GetPageWidth();
    // Add the test text outside the page area.
    gdpicturePDF.DrawWrappedText(fontName, 4, -1, pageWidth - 4, -2,
        TextAlignment.TextAlignmentCenter, multiline, false, ref StartPos);
    // If the full text does not fit, use the short version.
    if (StartPos!= -1) multiline = shortMultiline;
    StartPos= 0;
    // Add the final text to the desired location.
    gdpicturePDF.DrawWrappedText(fontName, 4, 2, pageWidth - 4, 1,
        TextAlignment.TextAlignmentCenter, multiline, false, ref StartPos);
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Set the origin of the coordinate system to the bottom-left corner.
    gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft)
    ' Set the measurement unit to centimeters.
    gdpicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter)
    ' Specify the font type.
    Dim fontName As String = gdpicturePDF.AddStandardFont(PdfStandardFont.PdfStandardFontHelveticaBold)
    ' Set the `StartPos` parameter to `0`.
    Dim StartPos = 0
    Dim shortMultiline = "This Agreement supersedes any prior written or "
        & "verbal communication or understanding."
    Dim multiline = "This Agreement supersedes any prior written or "
        & "verbal communication or understanding. "
        & "We may change the terms of this Agreement at any time. "
        & "Any later version of this document shall supersede all previous versions."
    For i As Integer = 1 To gdpicturePDF.GetPageCount()
        ' Select the PDF page.
        gdpicturePDF.SelectPage(i)
        ' Set the fill color to gray.
        gdpicturePDF.SetFillColor(128, 128, 128)
        Dim pageWidth As Single = gdpicturePDF.GetPageWidth()
        ' Add the test text outside the page area.
        gdpicturePDF.DrawWrappedText(fontName, 4, -1, pageWidth - 4, -2,
            TextAlignment.TextAlignmentCenter, multiline, False, StartPos)
        ' If the full text does not fit, use the short version.
        If StartPos <> -1 Then multiline = shortMultiline
        StartPos = 0
        ' Add the final text to the desired location.
        gdpicturePDF.DrawWrappedText(fontName, 4, 2, pageWidth - 4, 1,
            TextAlignment.TextAlignmentCenter, multiline, False, StartPos)
    Next
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

- [`AddStandardFont`]

- [`DrawWrappedText`]

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

- [`LoadFromFile`]

- [`SelectPage`]

- [`SetMeasurementUnit`]

- [`SetOrigin`]

- [`SetFillColor`]

- [`SetTextSize`]

- [`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)

## Text settings in PDFs

This section explains how to configure general text settings, such as measurement units and font settings, in a PDF file.

### Measurement unit

Some methods require parameters that represent distance values. To specify the units of those parameters, use the [`SetMeasurementUnit`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetMeasurementUnit.html) method, which uses the `PdfMeasurementUnit` enumeration as an argument. It accepts the following values:

- `PdfMeasurementUnitCentimeter`

- `PdfMeasurementUnitMillimeter`

- `PdfMeasurementUnitInch`

- `PdfMeasurementUnitPoint`

- `PdfMeasurementUnitUndefined`

Throughout your code, you can change the distance units by calling the `SetMeasurementUnit` method with a different unit type.

### Font type

To specify the font of the text, use one of the methods below.

- [`AddStandardFont`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~AddStandardFont.html) method. This method requires the `PdfStandardFont` enumeration, which accepts the following values:
  - `PdfStandardFontCourier`
  - `PdfStandardFontCourierBold`
  - `PdfStandardFontCourierBoldOblique`
  - `PdfStandardFontCourierOblique`
  - `PdfStandardFontHelvetica`
  - `PdfStandardFontHelveticaBold`
  - `PdfStandardFontHelveticaBoldOblique`
  - `PdfStandardFontHelveticaOblique`
  - `PdfStandardFontSymbol`
  - `PdfStandardFontTimesRoman`
  - `PdfStandardFontTimesBold`
  - `PdfStandardFontTimesBoldItalic`
  - `PdfStandardFontTimesItalic`
  - `PdfStandardFontZapfDingbats`

- [`AddTrueTypeFont`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~AddTrueTypeFont.html) method. It allows loading any standard font format of the Microsoft Windows operating system and accepts the following parameters:
  - `FontName` — The name of the font.
  - `Bold` — Makes the text bold if set to `true`.
  - `Italic` — Makes the text italic if set to `true`.
  - `Embedded` — Embeds the text if set to `true`.

Embedded texts significantly increase the file size.

### Text size

To specify the text size, use the [`SetTextSize`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetTextSize.html) method. It takes an integer as its parameter, which is the text size expressed in points (pt).

### Text color

To set the text color, use the [`SetFillColor`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPicturePDF~SetFillColor.html) method. It accepts one of the following:

- RGB code.

- CMYK code.

- A `Color` object. For more information, refer to the [`Color Object`](https://www.nutrient.io/guides/dotnet/editor/manipulation/colors/#color-object) topic.

- An [`ARGB`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ARGB.html) method. For more information, refer to the [`ARGB Method`](https://www.nutrient.io/guides/dotnet/editor/manipulation/colors/#argb-method) topic.
---

## Related pages

- [Add an image to a PDF using C#](/guides/dotnet/editor/add-image-to-pdf.md)
- [Add a page to a PDF or a TIFF image in C# .NET](/guides/dotnet/editor/add-page.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 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)

