[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfDictExt.TryGetColor

TryGetColor Method

TryGetColor(IPdfDict, PdfName, out Color)

Tries to get the Color associated with the specified key (in a PDF a 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 Color.

Declaration
public static bool TryGetColor(this IPdfDict dict, PdfName key, out Color value)
Public Shared Function TryGetColor(dict As IPdfDict, key As PdfName, ByRef value As Color) As Boolean
Parameters
Type Name Description
IPdfDict dict

The current dictionary.

PdfName key

The key of the value to get.

Color value

OUT: the value associated with the specified key.

Returns
Type Description
bool

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