Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictExt Class / TryGetColor Method
The current dictionary.
The key of the value to get.
OUT: the value associated with the specified key.

In This Topic
    TryGetColor Method
    In This Topic
    Tries to get 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).

    Adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value exists but cannot be converted to System.Drawing.Color.

    Syntax
    'Declaration
     
    Public Shared Function TryGetColor( _
       ByVal dict As IPdfDict, _
       ByVal key As PdfName, _
       ByRef value As System.Drawing.Color _
    ) As System.Boolean
    public static System.bool TryGetColor( 
       IPdfDict dict,
       PdfName key,
       out System.Drawing.Color value
    )

    Parameters

    dict
    The current dictionary.
    key
    The key of the value to get.
    value
    OUT: the value associated with the specified key.

    Return Value

    True if the key was found and the value could be converted to a System.Drawing.Color, false otherwise.
    See Also