Table of Contents

Class PdfPens

Namespace
Syncfusion.Pdf.Graphics
Assembly
Syncfusion.Pdf.Portable.dll

The collection of the default pens.

public sealed class PdfPens
Inheritance
PdfPens
Inherited Members

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Black, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Black, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Properties

AliceBlue

Gets the AliceBlue pen.

public static PdfPen AliceBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.AliceBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.AliceBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

AntiqueWhite

Gets the antique white pen.

public static PdfPen AntiqueWhite { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.AntiqueWhite, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.AntiqueWhite, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Aqua

Gets the Aqua default pen.

public static PdfPen Aqua { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Aqua, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Aqua, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Aquamarine

Gets the Aquamarine default pen.

public static PdfPen Aquamarine { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Aquamarine, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Aquamarine, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Azure

Gets the Azure default pen.

public static PdfPen Azure { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Azure, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Azure, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Beige

Gets the Beige default pen.

public static PdfPen Beige { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Beige, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Beige, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Bisque

Gets the Bisque default pen.

public static PdfPen Bisque { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Bisque, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Bisque, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Black

Gets the Black default pen.

public static PdfPen Black { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Black, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Black, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

BlanchedAlmond

Gets the BlanchedAlmond default pen.

public static PdfPen BlanchedAlmond { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.BlanchedAlmond, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.BlanchedAlmond, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Blue

Gets the Blue default pen.

public static PdfPen Blue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Blue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Blue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

BlueViolet

Gets the BlueViolet default pen.

public static PdfPen BlueViolet { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.BlueViolet, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.BlueViolet, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Brown

Gets the Brown default pen.

public static PdfPen Brown { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Brown, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Brown, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

BurlyWood

Gets the BurlyWood default pen.

public static PdfPen BurlyWood { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.BurlyWood, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.BurlyWood, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

CadetBlue

Gets the CadetBlue default pen.

public static PdfPen CadetBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.CadetBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.CadetBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Chartreuse

Gets the Chartreuse default pen.

public static PdfPen Chartreuse { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Chartreuse, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Chartreuse, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Chocolate

Gets the Chocolate default pen.

public static PdfPen Chocolate { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Chocolate, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Chocolate, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Coral

Gets the Coral default pen.

public static PdfPen Coral { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Coral, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Coral, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

CornflowerBlue

Gets the CornflowerBlue default pen.

public static PdfPen CornflowerBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.CornflowerBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.CornflowerBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Cornsilk

Gets the Corn silk default pen.

public static PdfPen Cornsilk { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Cornsilk, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Cornsilk, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Crimson

Gets the Crimson default pen.

public static PdfPen Crimson { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Crimson, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Crimson, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Cyan

Gets the Cyan default pen.

public static PdfPen Cyan { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Cyan, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Cyan, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkBlue

Gets the DarkBlue default pen.

public static PdfPen DarkBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkCyan

Gets the DarkCyan default pen.

public static PdfPen DarkCyan { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkCyan, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkCyan, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkGoldenrod

Gets the DarkGoldenrod default pen.

public static PdfPen DarkGoldenrod { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGoldenrod, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGoldenrod, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkGray

Gets the DarkGray default pen.

public static PdfPen DarkGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkGreen

Gets the DarkGreen default pen.

public static PdfPen DarkGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkKhaki

Gets the DarkKhaki default pen.

public static PdfPen DarkKhaki { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkKhaki, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkKhaki, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkMagenta

Gets the DarkMagenta default pen.

public static PdfPen DarkMagenta { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkMagenta, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkMagenta, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkOliveGreen

Gets the DarkOliveGreen default pen.

public static PdfPen DarkOliveGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOliveGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOliveGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkOrange

Gets the DarkOrange default pen.

public static PdfPen DarkOrange { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOrange, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOrange, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkOrchid

Gets the DarkOrchid default pen.

public static PdfPen DarkOrchid { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOrchid, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkOrchid, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkRed

Gets the DarkRed default pen.

public static PdfPen DarkRed { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkRed, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkRed, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkSalmon

Gets the DarkSalmon default pen.

public static PdfPen DarkSalmon { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSalmon, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSalmon, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkSeaGreen

Gets the DarkSeaGreen default pen.

public static PdfPen DarkSeaGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSeaGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSeaGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkSlateBlue

Gets the DarkSlateBlue default pen.

public static PdfPen DarkSlateBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSlateBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSlateBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkSlateGray

Gets the DarkSlateGray default pen.

public static PdfPen DarkSlateGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSlateGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkSlateGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkTurquoise

Gets the DarkTurquoise default pen.

public static PdfPen DarkTurquoise { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkTurquoise, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkTurquoise, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DarkViolet

Gets the DarkViolet default pen.

public static PdfPen DarkViolet { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkViolet, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DarkViolet, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DeepPink

Gets the DeepPink default pen.

public static PdfPen DeepPink { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DeepPink, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DeepPink, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DeepSkyBlue

Gets the DeepSkyBlue default pen.

public static PdfPen DeepSkyBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DeepSkyBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DeepSkyBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DimGray

Gets the DimGray default pen.

public static PdfPen DimGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DimGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DimGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

DodgerBlue

Gets the DodgerBlue default pen.

public static PdfPen DodgerBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.DodgerBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.DodgerBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Firebrick

Gets the Firebrick default pen.

public static PdfPen Firebrick { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Firebrick, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Firebrick, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

FloralWhite

Gets the FloralWhite default pen.

public static PdfPen FloralWhite { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.FloralWhite, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.FloralWhite, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

ForestGreen

Gets the ForestGreen default pen.

public static PdfPen ForestGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.ForestGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.ForestGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Fuchsia

Gets the Fuchsia default pen.

public static PdfPen Fuchsia { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Fuchsia, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Fuchsia, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Gainsboro

Gets the Gainsborough default pen.

public static PdfPen Gainsboro { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Gainsboro, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Gainsboro, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

GhostWhite

Gets the GhostWhite default pen.

public static PdfPen GhostWhite { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.GhostWhite, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.GhostWhite, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Gold

Gets the Gold default pen.

public static PdfPen Gold { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Gold, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Gold, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Goldenrod

Gets the Goldenrod default pen.

public static PdfPen Goldenrod { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Goldenrod, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Goldenrod, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Gray

Gets the Gray default pen.

public static PdfPen Gray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Gray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Gray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Green

Gets the Green default pen.

public static PdfPen Green { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Green, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Green, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

GreenYellow

Gets the GreenYellow default pen.

public static PdfPen GreenYellow { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.GreenYellow, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.GreenYellow, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Honeydew

Gets the Honeydew default pen.

public static PdfPen Honeydew { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Honeydew, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Honeydew, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

HotPink

Gets the HotPink default pen.

public static PdfPen HotPink { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.HotPink, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.HotPink, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

IndianRed

Gets the IndianRed default pen.

public static PdfPen IndianRed { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.IndianRed, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.IndianRed, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Indigo

Gets the Indigo default pen.

public static PdfPen Indigo { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Indigo, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Indigo, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Ivory

Gets the Ivory default pen.

public static PdfPen Ivory { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Ivory, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Ivory, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Khaki

Gets the Khaki default pen.

public static PdfPen Khaki { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Khaki, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Khaki, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Lavender

Gets the Lavender default pen.

public static PdfPen Lavender { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Lavender, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Lavender, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LavenderBlush

Gets the LavenderBlush default pen.

public static PdfPen LavenderBlush { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LavenderBlush, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LavenderBlush, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LawnGreen

Gets the LawnGreen default pen.

public static PdfPen LawnGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LawnGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LawnGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LemonChiffon

Gets the LemonChiffon default pen.

public static PdfPen LemonChiffon { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LemonChiffon, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LemonChiffon, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightBlue

Gets the LightBlue default pen.

public static PdfPen LightBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightCoral

Gets the LightCoral default pen.

public static PdfPen LightCoral { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightCoral, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightCoral, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightCyan

Gets the LightCyan default pen.

public static PdfPen LightCyan { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightCyan, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightCyan, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightGoldenrodYellow

Gets the LightGoldenrodYellow default pen.

public static PdfPen LightGoldenrodYellow { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGoldenrodYellow, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGoldenrodYellow, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightGray

Gets the LightGray default pen.

public static PdfPen LightGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightGreen

Gets the LightGreen default pen.

public static PdfPen LightGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightPink

Gets the LightPink default pen.

public static PdfPen LightPink { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightPink, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightPink, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightSalmon

Gets the LightSalmon default pen.

public static PdfPen LightSalmon { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSalmon, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSalmon, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightSeaGreen

Gets the LightSeaGreen default pen.

public static PdfPen LightSeaGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSeaGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSeaGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightSkyBlue

Gets the LightSkyBlue default pen.

public static PdfPen LightSkyBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSkyBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSkyBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightSlateGray

Gets the LightSlateGray default pen.

public static PdfPen LightSlateGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSlateGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSlateGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightSteelBlue

Gets the LightSteelBlue default pen.

public static PdfPen LightSteelBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSteelBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightSteelBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LightYellow

Gets the LightYellow default pen.

public static PdfPen LightYellow { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LightYellow, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LightYellow, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Lime

Gets the Lime default pen.

public static PdfPen Lime { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Lime, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Lime, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

LimeGreen

Gets the LimeGreen default pen.

public static PdfPen LimeGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.LimeGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.LimeGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Linen

Gets the Linen default pen.

public static PdfPen Linen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Linen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Linen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Magenta

Gets the Magenta default pen.

public static PdfPen Magenta { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Magenta, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Magenta, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Maroon

Gets the Maroon default pen.

public static PdfPen Maroon { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Maroon, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Maroon, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumAquamarine

Gets the MediumAquamarine default pen.

public static PdfPen MediumAquamarine { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumAquamarine, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumAquamarine, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumBlue

Gets the MediumBlue default pen.

public static PdfPen MediumBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumOrchid

Gets the MediumOrchid default pen.

public static PdfPen MediumOrchid { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumOrchid, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumOrchid, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumPurple

Gets the MediumPurple default pen.

public static PdfPen MediumPurple { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumPurple, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumPurple, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumSeaGreen

Gets the MediumSeaGreen default pen.

public static PdfPen MediumSeaGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSeaGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSeaGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumSlateBlue

Gets the MediumSlateBlue default pen.

public static PdfPen MediumSlateBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSlateBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSlateBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumSpringGreen

Gets the MediumSpringGreen default pen.

public static PdfPen MediumSpringGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSpringGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumSpringGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumTurquoise

Gets the MediumTurquoise default pen.

public static PdfPen MediumTurquoise { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumTurquoise, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumTurquoise, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MediumVioletRed

Gets the MediumVioletRed default pen.

public static PdfPen MediumVioletRed { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumVioletRed, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MediumVioletRed, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MidnightBlue

Gets the MidnightBlue default pen.

public static PdfPen MidnightBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MidnightBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MidnightBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MintCream

Gets the MintCream default pen.

public static PdfPen MintCream { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MintCream, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MintCream, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

MistyRose

Gets the MistyRose default pen.

public static PdfPen MistyRose { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.MistyRose, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.MistyRose, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Moccasin

Gets the Moccasin default pen.

public static PdfPen Moccasin { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Moccasin, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Moccasin, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

NavajoWhite

Gets the NavajoWhite default pen.

public static PdfPen NavajoWhite { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.NavajoWhite, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.NavajoWhite, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Navy

Gets the Navy default pen.

public static PdfPen Navy { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Navy, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Navy, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

OldLace

Gets the OldLace default pen.

public static PdfPen OldLace { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.OldLace, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.OldLace, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Olive

Gets the Olive default pen.

public static PdfPen Olive { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Olive, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Olive, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

OliveDrab

Gets the OliveDrab default pen.

public static PdfPen OliveDrab { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.OliveDrab, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.OliveDrab, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Orange

Gets the Orange default pen.

public static PdfPen Orange { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Orange, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Orange, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

OrangeRed

Gets the OrangeRed default pen.

public static PdfPen OrangeRed { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.OrangeRed, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.OrangeRed, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Orchid

Gets the Orchid default pen.

public static PdfPen Orchid { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Orchid, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Orchid, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PaleGoldenrod

Gets the PaleGoldenrod default pen.

public static PdfPen PaleGoldenrod { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleGoldenrod, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleGoldenrod, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PaleGreen

Gets the PaleGreen default pen.

public static PdfPen PaleGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PaleTurquoise

Gets the PaleTurquoise default pen.

public static PdfPen PaleTurquoise { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleTurquoise, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleTurquoise, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PaleVioletRed

Gets the PaleVioletRed default pen.

public static PdfPen PaleVioletRed { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleVioletRed, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PaleVioletRed, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PapayaWhip

Gets the PapayaWhip default pen.

public static PdfPen PapayaWhip { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PapayaWhip, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PapayaWhip, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PeachPuff

Gets the PeachPuff default pen.

public static PdfPen PeachPuff { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PeachPuff, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PeachPuff, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Peru

Gets the Peru default pen.

public static PdfPen Peru { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Peru, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Peru, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Pink

Gets the Pink default pen.

public static PdfPen Pink { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Pink, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Pink, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Plum

Gets the Plum default pen.

public static PdfPen Plum { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Plum, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Plum, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

PowderBlue

Gets the PowderBlue default pen.

public static PdfPen PowderBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.PowderBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.PowderBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Purple

Gets the Purple default pen.

public static PdfPen Purple { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Purple, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Purple, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Red

Gets the Red default pen.

public static PdfPen Red { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Red, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Red, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

RosyBrown

Gets the RosyBrown default pen.

public static PdfPen RosyBrown { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.RosyBrown, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.RosyBrown, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

RoyalBlue

Gets the RoyalBlue default pen.

public static PdfPen RoyalBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.RoyalBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.RoyalBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SaddleBrown

Gets the SaddleBrown default pen.

public static PdfPen SaddleBrown { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SaddleBrown, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SaddleBrown, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Salmon

Gets the Salmon default pen.

public static PdfPen Salmon { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Salmon, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Salmon, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SandyBrown

Gets the SandyBrown default pen.

public static PdfPen SandyBrown { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SandyBrown, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SandyBrown, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SeaGreen

Gets the SeaGreen default pen.

public static PdfPen SeaGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SeaGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SeaGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SeaShell

Gets the SeaShell default pen.

public static PdfPen SeaShell { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SeaShell, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SeaShell, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Sienna

Gets the Sienna default pen.

public static PdfPen Sienna { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Sienna, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Sienna, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Silver

Gets the Silver default pen.

public static PdfPen Silver { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Silver, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Silver, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SkyBlue

Gets the SkyBlue default pen.

public static PdfPen SkyBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SkyBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SkyBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SlateBlue

Gets the SlateBlue default pen.

public static PdfPen SlateBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SlateBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SlateBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SlateGray

Gets the SlateGray default pen.

public static PdfPen SlateGray { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SlateGray, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SlateGray, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Snow

Gets the Snow default pen.

public static PdfPen Snow { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Snow, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Snow, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SpringGreen

Gets the SpringGreen default pen.

public static PdfPen SpringGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SpringGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SpringGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

SteelBlue

Gets the SteelBlue default pen.

public static PdfPen SteelBlue { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.SteelBlue, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.SteelBlue, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Tan

Gets the Tan default pen.

public static PdfPen Tan { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Tan, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Tan, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Teal

Gets the Teal default pen.

public static PdfPen Teal { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Teal, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Teal, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Thistle

Gets the Thistle default pen.

public static PdfPen Thistle { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Thistle, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Thistle, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Tomato

Gets the Tomato default pen.

public static PdfPen Tomato { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Tomato, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Tomato, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Transparent

Gets the Transparent default pen.

public static PdfPen Transparent { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Transparent, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Transparent, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Turquoise

Gets the Turquoise default pen.

public static PdfPen Turquoise { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Turquoise, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Turquoise, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Violet

Gets the Violet default pen.

public static PdfPen Violet { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Violet, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Violet, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Wheat

Gets the Wheat default pen.

public static PdfPen Wheat { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Wheat, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Wheat, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

White

Gets the White default pen.

public static PdfPen White { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.White, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.White, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

WhiteSmoke

Gets the WhiteSmoke default pen.

public static PdfPen WhiteSmoke { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.WhiteSmoke, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.WhiteSmoke, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

Yellow

Gets the Yellow default pen.

public static PdfPen Yellow { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.Yellow, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.Yellow, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)

YellowGreen

Gets the YellowGreen default pen.

public static PdfPen YellowGreen { get; }

Property Value

PdfPen

Examples

//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;  
//Draw rectangle.
graphics.DrawRectangle(PdfPens.YellowGreen, new RectangleF(0, 0, 200, 100));
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics  
'Draw rectangle.
graphics.DrawRectangle(PdfPens.YellowGreen, New RectangleF(0, 0, 200, 100))
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)