Skip to content

PdfGraphics.DrawString Method

Overloads

Name Description
DrawString(String,PdfFont,PdfBrush,Double,Double) Draws the specified text string at the specified location with the specified PdfBrush and PdfFont objects.
DrawString(String,PdfFont,PdfBrush,Double,Double,PdfStructureElement) Draws the specified text string at the specified location with the specified PdfBrush and PdfFont objects.
DrawString(String,PdfFont,PdfBrush,PdfVisualRectangle) Draws the specified text string in the specified rectangle with the specified PdfBrush and PdfFont objects.
DrawString(String,PdfFont,PdfBrush,PdfVisualRectangle,PdfStructureElement) Draws the specified text string in the specified rectangle with the specified PdfBrush and PdfFont objects.
DrawString(String,PdfStringAppearanceOptions,PdfStringLayoutOptions) Draws the specified text string with the specified appearance and layout options.
DrawString(String,PdfStringAppearanceOptions,PdfStringLayoutOptions,PdfStructureElement) Draws the specified text string with the specified appearance and layout options.

DrawString(String,PdfFont,PdfBrush,Double,Double)

Draws the specified text string at the specified location with the specified PdfBrush and PdfFont objects.

C#
public void DrawString(string s, PdfFont font, PdfBrush brush, double x, double y)

Parameters

s String

String to draw.

font PdfFont

PdfFont that defines the text format of the string.

brush PdfBrush

PdfBrush that determines the color and texture of the drawn text.

x Double

The x-coordinate of the upper-left corner of the drawn text.

y Double

The y-coordinate of the upper-left corner of the drawn text.

DrawString(String,PdfFont,PdfBrush,Double,Double,PdfStructureElement)

Draws the specified text string at the specified location with the specified PdfBrush and PdfFont objects.

C#
public void DrawString(string s, PdfFont font, PdfBrush brush, double x, double y, PdfStructureElement structureElement)

Parameters

s String

String to draw.

font PdfFont

PdfFont that defines the text format of the string.

brush PdfBrush

PdfBrush that determines the color and texture of the drawn text.

x Double

The x-coordinate of the upper-left corner of the drawn text.

y Double

The y-coordinate of the upper-left corner of the drawn text.

structureElement PdfStructureElement

The structure element that is associated with this piece of content.

DrawString(String,PdfFont,PdfBrush,PdfVisualRectangle)

Draws the specified text string in the specified rectangle with the specified PdfBrush and PdfFont objects.

C#
public void DrawString(string s, PdfFont font, PdfBrush brush, PdfVisualRectangle rectangle)

Parameters

s String

String to draw.

font PdfFont

PdfFont that defines the text format of the string.

brush PdfBrush

PdfBrush that determines the color and texture of the drawn text.

rectangle PdfVisualRectangle

PdfVisualRectangle object that specifies the location of the drawn text.

DrawString(String,PdfFont,PdfBrush,PdfVisualRectangle,PdfStructureElement)

Draws the specified text string in the specified rectangle with the specified PdfBrush and PdfFont objects.

C#
public void DrawString(string s, PdfFont font, PdfBrush brush, PdfVisualRectangle rectangle, PdfStructureElement structureElement)

Parameters

s String

String to draw.

font PdfFont

PdfFont that defines the text format of the string.

brush PdfBrush

PdfBrush that determines the color and texture of the drawn text.

rectangle PdfVisualRectangle

PdfVisualRectangle object that specifies the location of the drawn text.

structureElement PdfStructureElement

The structure element that is associated with this piece of content.

DrawString(String,PdfStringAppearanceOptions,PdfStringLayoutOptions)

Draws the specified text string with the specified appearance and layout options.

C#
public void DrawString(string s, PdfStringAppearanceOptions stringAppearanceOptions, PdfStringLayoutOptions stringLayoutOptions)

Parameters

s String

String to draw.

stringAppearanceOptions PdfStringAppearanceOptions

Options that determine the string visual appearance.

stringLayoutOptions PdfStringLayoutOptions

Options that determine the text layout.

DrawString(String,PdfStringAppearanceOptions,PdfStringLayoutOptions,PdfStructureElement)

Draws the specified text string with the specified appearance and layout options.

C#
public void DrawString(string s, PdfStringAppearanceOptions stringAppearanceOptions, PdfStringLayoutOptions stringLayoutOptions, PdfStructureElement structureElement)

Parameters

s String

String to draw.

stringAppearanceOptions PdfStringAppearanceOptions

Options that determine the string visual appearance.

stringLayoutOptions PdfStringLayoutOptions

Options that determine the text layout.

structureElement PdfStructureElement

The structure element that is associated with this piece of content.