Table of Contents

Method GetName

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

GetName(string, bool, string)

Gets the name value that corresponds to the specified key. If the key does not exist and create is false, the function returns the defaultValue. If the key does not exist and create is true, a direct value will be created using the defaultValue. If the key exists but the value is neither a name nor a PDF reference to a name, the function throws an InvalidOperationException. Note that the default defaultValue is the empty name ("/"), not the empty string.

public string GetName(string key, bool create = false, string defaultValue = "/")

Parameters

key string
create bool
defaultValue string

Returns

string