.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfGraphics Members

Implements drawing on a PDF page.

Fields

Name Description
DefaultDpi The default DPI of a page that is the default size to display text and other content on the page.

Properties

Name Description
ConvertImagesToJpeg Specifies whether to convert bitmap images to the Jpeg format reducing the size of the resulting PDF document.
JpegImageQuality Gets or sets the quality of Jpeg images in the resulting PDF file.
TextOrigin Specifies how to interpret a point passed to one of the PdfGraphics.DrawString overload methods that take a PointF object.
UseKerning Gets or sets a value which indicates whether kerning is used when drawing characters.

Methods

Name Description
AddFormField(PdfGraphicsAcroFormField) Adds an interactive form field to PDF graphics.
AddLinkToPage(RectangleF, Int32) Adds a link to the page with the specified page number.
AddLinkToPage(RectangleF, Int32, Single) Adds a link to the page with specified page number and zoom factor.
AddLinkToPage(RectangleF, Int32, Single, Single) Adds a link to the page with the specified page number and page destination.
AddLinkToPage(RectangleF, Int32, Single, Single, Single) Adds a link to the page with the specified page number, page destination, and zoom factor.
AddLinkToUri(RectangleF, Uri) Adds a link to the Uri at the specified link area on the page.
AddToPageBackground(PdfPage) Adds graphics to a PDF page background.
AddToPageBackground(PdfPage, Single, Single) Adds graphics to a PDF page background with the specified horizontal and vertical resolutions.
AddToPageForeground(PdfPage) Adds graphics to a PDF page foreground.
AddToPageForeground(PdfPage, Single, Single) Adds graphics to a PDF page foreground with the specified horizontal and vertical resolutions.
ClearFormFields() Clears all interactive form fields that were previously added to PDF graphics.
DrawBezier(Pen, PointF, PointF, PointF, PointF) Draws a Bezier spline defined by four Point structures.
DrawBeziers(Pen, PointF[]) Draws a series of Bezier splines from an array of PointF structures.
DrawEllipse(Pen, RectangleF) Draws an ellipse specified by a RectangleF structure.
DrawImage(Byte[], PointF) Draws the specified image using the byte array data at the specified location.
DrawImage(Byte[], RectangleF) Draws an image using an array of bytes representing image data and the image bounds.
DrawImage(Image, PointF) Draws the specified image in its original size at the specified location.
DrawImage(Image, RectangleF) Draws an image using the specified image bounds.
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit) Draws the portion of the specified Image at the specified location in the specified size.
DrawImage(Stream, PointF) Draws an image at the specified location using the stream data.
DrawImage(Stream, RectangleF) Draws an image with the bounds and stream.
DrawLine(Pen, Single, Single, Single, Single) Draws a line connecting two points on the page specified by the coordinate pairs.
DrawLines(Pen, PointF[]) Draws a series of line segments that connect an array of PointF structures.
DrawPath(Pen, GraphicsPath) Draws a path on a page.
DrawPolygon(Pen, PointF[]) Draws a polygon defined by an array of PointF structures.
DrawRectangle(Pen, RectangleF) Draws a rectangle specified by a Rectangle structure.
DrawString(String, Font, SolidBrush, PointF) A set of overloaded methods used to draw the text string with the specified SolidBrush, Font objects and other parameters.
DrawString(String, Font, SolidBrush, PointF, PdfStringFormat) Draws the specified text string at the specified location with the specified SolidBrush and Font objects using the formatting attributes of the specified PdfStringFormat.
DrawString(String, Font, SolidBrush, RectangleF) A set of overloaded methods used to draw the text string with the specified SolidBrush, Font objects and other parameters.
DrawString(String, Font, SolidBrush, RectangleF, PdfStringFormat) Draws the specified text at the specified rectangle with the specified SolidBrush and Font objects using the formatting attributes of the specified PdfStringFormat.
DrawString(String, Font, SolidBrush, Single, Single) A set of overloaded methods used to draw the text string with the specified SolidBrush, Font objects and other parameters.
DrawString(String, Font, SolidBrush, Single, Single, PdfStringFormat) Draws the specified text string at the specified location with the specified SolidBrush and Font objects using the formatting attributes of the specified PdfStringFormat.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
FillEllipse(Brush, RectangleF) Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
FillPath(Brush, GraphicsPath) Fills the interior of a GraphicsPath.
FillPolygon(Brush, PointF[]) Fills the interior of a polygon defined by an array of points specified by PointF structures.
FillRectangle(Brush, RectangleF) Fills the interior of a rectangle specified by a RectangleF structure.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
IntersectClip(RectangleF) Updates the clip region of this PdfGraphics object to the intersection of the current clip region and the specified RectangleF structure.
MeasureString(String, Font) Measures the specified string when drawn with the specified Font.
MeasureString(String, Font, PdfStringFormat) Measures the specified string when drawn with the specified Font and formatted with the specified PdfStringFormat.
MeasureString(String, Font, PdfStringFormat, Single, Single) Measures the specified string when drawn with the specified Font, horizontal and vertical resolutions and format.
MeasureString(String, Font, SizeF) Measures the specified string when drawn with the specified Font and text layout size.
MeasureString(String, Font, SizeF, PdfStringFormat) Measures the specified string when drawn with the specified Font, text layout size, and format.
MeasureString(String, Font, SizeF, PdfStringFormat, Single, Single) Measures the specified string when drawn with the specified Font, text layout size, horizontal and vertical resolutions, and format.
MeasureString(String, Font, SizeF, PdfStringFormat, Single, Single, out Int32, out Int32) Measures the string when it is drawn with the specific font and formatted with the given string format.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
RestoreGraphicsState() Restores the most recently saved graphics state.
RotateTransform(Single) Rotates the coordinate system clockwise relative to its origin to the specified angle.
SaveGraphicsState() Saves the current graphics state to the stack.
ScaleTransform(Single, Single) Scales the coordinate system according to the specified scale factor.
ToString() Returns a string that represents the current object. Inherited from Object.
TranslateTransform(Single, Single) Translates the origin of the coordinate system to the specified point.
See Also