[]
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.
public static bool TryGetStringOrName(this IPdfDict dict, PdfName key, out string value, bool addWarning = true)
| Type | Name | Description |
|---|---|---|
| IPdfDict | dict | The current dictionary. |
| PdfName | key | The key of the value to get. |
| string | value | OUT: the value associated with the specified key. |
| bool | addWarning | Specifies whether to add a warning if the value could not be converted. |
| Type | Description |
|---|---|
| bool | True if the key was found and the value could be converted to a Boolean, false otherwise. |