Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictExt Class / GetColor Method / GetColor(IPdfDict,PdfName,Color) Method
The current dictionary.
The key of the value to get.
The default value.

In This Topic
    GetColor(IPdfDict,PdfName,Color) Method
    In This Topic
    Gets the System.Drawing.Color associated with the specified key (in a PDF a System.Drawing.Color should be represented as an array of 1, 3 or 4 floats).

    Gets defValue if the value does not exist or cannot be converted to a System.Drawing.Color.

    Adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value cannot be converted to a System.Drawing.Color.
    Syntax
    'Declaration
     
    Public Overloads Shared Function GetColor( _
       ByVal dict As IPdfDict, _
       ByVal key As PdfName, _
       ByVal defValue As System.Drawing.Color _
    ) As System.Drawing.Color
    public static System.Drawing.Color GetColor( 
       IPdfDict dict,
       PdfName key,
       System.Drawing.Color defValue
    )

    Parameters

    dict
    The current dictionary.
    key
    The key of the value to get.
    defValue
    The default value.

    Return Value

    The value associated with the specified key.
    See Also