Class PdfColorSpaces
Represents the base class for all colorspaces.
Inheritance
System.Object
PdfColorSpaces
Namespace: Syncfusion.Pdf.ColorSpace
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public abstract class PdfColorSpaces : Object, IPdfWrapper, IPdfCache
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()
Declaration
protected PdfColorSpaces()
Fields
s_syncObject
Internal variable to store the internal object.
Declaration
protected static object s_syncObject
Field Value
Type |
---|
System.Object |
See Also
Syncfusion.Pdf.IPdfWrapper