menu

ASP.NET Web Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfGraphicsElement

    Show / Hide Table of Contents

    Class PdfGraphicsElement

    Represents a base class for all the page graphics elements.

    Inheritance
    System.Object
    PdfGraphicsElement
    PdfLayoutElement
    PdfAutomaticField
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public abstract class PdfGraphicsElement
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Add a new PDF page.
    PdfPage page = document.Pages.Add();
    //Create new PdfRectangle instance.
    PdfRectangle rect = new PdfRectangle(200, 100);
    //Draw the rectangle to PDF page.
    rect.Draw(page, PointF.Empty);
    //Save the PDF docment.
    document.Save("output.pdf");
    //Close the PDF document.
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Add a new PDF page.
    Dim page As PdfPage = document.Pages.Add()
    'Create new PdfRectangle instance.
    Dim rect As New PdfRectangle(200, 100)
    'Draw the rectangle to PDF page.
    rect.Draw(page, PointF.Empty)
    'Save the PDF docment.
    document.Save("output.pdf") 
    Close the PDF document.
    document.Close(True)

    Constructors

    PdfGraphicsElement()

    Initializes a new instance of the PdfGraphicsElement class.

    Declaration
    protected PdfGraphicsElement()

    Methods

    Draw(PdfGraphics)

    Declaration
    public void Draw(PdfGraphics graphics)
    Parameters
    Type Name Description
    PdfGraphics graphics

    Draw(PdfGraphics, PointF)

    Declaration
    public void Draw(PdfGraphics graphics, PointF location)
    Parameters
    Type Name Description
    PdfGraphics graphics
    System.Drawing.PointF location

    Draw(PdfGraphics, Single, Single)

    Declaration
    public virtual void Draw(PdfGraphics graphics, float x, float y)
    Parameters
    Type Name Description
    PdfGraphics graphics
    System.Single x
    System.Single y
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved