Table of Contents

Class PdfColorSpaces

Namespace
Syncfusion.Pdf.ColorSpace
Assembly
Syncfusion.Pdf.Portable.dll

Represents the base class for all colorspaces.

public abstract class PdfColorSpaces
Inheritance
PdfColorSpaces
Derived
Inherited Members

Examples

// Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = doc.Pages.Add();
//  Set the document`s color spaces as GrayScale 
doc.ColorSpace = PdfColorSpace.GrayScale;
PdfPen pen = new PdfPen(PdfBrushes.Red);          
// Draws the rectangle
page.Graphics.DrawRectangle(pen, new RectangleF(0,0,100,200));
doc.Save("ColorSpace.pdf");
' Create a new PDF document.
Dim doc As PdfDocument = New PdfDocument()
' Create a page
Dim page As PdfPage = doc.Pages.Add()
'  Set the document`s color spaces as GrayScale 
doc.ColorSpace = PdfColorSpace.GrayScale
Dim pen As PdfPen = New PdfPen(PdfBrushes.Red)
' Draws the rectangle
page.Graphics.DrawRectangle(pen, New RectangleF(0,0,100,200))
doc.Save("ColorSpace.pdf")

Constructors

PdfColorSpaces()

protected PdfColorSpaces()
See Also

Fields

s_syncObject

Internal variable to store the internal object.

protected static object s_syncObject

Field Value

object
See Also

See Also