menu

Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfColorSpaces - Xamarin.Android API Reference | Syncfusion

    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
    Namespace: Syncfusion.Pdf.ColorSpace
    Assembly: Syncfusion.Pdf.Portable.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

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