Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Spec Namespace / IPdfDictExt Class / TryGetStringOrName Method
The current dictionary.
The key of the value to get.
OUT: the value associated with the specified key.
Specifies whether to add a warning if the value could not be converted.

In This Topic
    TryGetStringOrName Method
    In This Topic
    Tries to get the string associated with the specified key. The string can be specified in the PDF as a PDF string or a PDF name.

    Optionally adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog if the value exists but cannot be converted to a PdfString.

    Syntax
    'Declaration
     
    Public Shared Function TryGetStringOrName( _
       ByVal dict As IPdfDict, _
       ByVal key As PdfName, _
       ByRef value As System.String, _
       Optional ByVal addWarning As System.Boolean _
    ) As System.Boolean
    public static System.bool TryGetStringOrName( 
       IPdfDict dict,
       PdfName key,
       out System.string value,
       System.bool addWarning
    )

    Parameters

    dict
    The current dictionary.
    key
    The key of the value to get.
    value
    OUT: the value associated with the specified key.
    addWarning
    Specifies whether to add a warning if the value could not be converted.

    Return Value

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