ASP.NET MVC

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

    Show / Hide Table of Contents

    Class PdfColorSpaces

    Represents the base class for all colorspaces.

    Inheritance
    System.Object
    PdfColorSpaces
    PdfCalGrayColorSpace
    PdfCalRGBColorSpace
    PdfDeviceColorSpace
    PdfICCColorSpace
    PdfIndexedColorSpace
    PdfLabColorSpace
    PdfSeparationColorSpace
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Pdf.ColorSpace
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public abstract class PdfColorSpaces : 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 Description
    System.Object

    See Also

    PdfPen
    Syncfusion.Pdf.IPdfWrapper
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved