• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class ObjectDictionary

Controlled low-level dictionary editing surface for advanced PDF scenarios.

Inheritance
object
ObjectDictionary
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Objects
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ObjectDictionary

Methods

ContainsKey(string)

Returns true when the dictionary contains the given key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
string key
Returns
Type Description
bool

GetBoolean(string)

Gets a boolean value for the given key, or null when absent/non-boolean.

Declaration
public bool? GetBoolean(string key)
Parameters
Type Name Description
string key
Returns
Type Description
bool?

GetDictionary(string)

Retrieves a nested dictionary by key if present; returns null when absent. Supports direct and indirect dictionary values.

Declaration
public ObjectDictionary? GetDictionary(string key)
Parameters
Type Name Description
string key
Returns
Type Description
ObjectDictionary

GetOrAddDictionary(string, bool)

Gets an existing nested dictionary, or creates one when missing.

Declaration
public ObjectDictionary GetOrAddDictionary(string key, bool indirect = true)
Parameters
Type Name Description
string key
bool indirect
Returns
Type Description
ObjectDictionary

GetString(string)

Gets a textual representation for a value stored under the given key.

Declaration
public string? GetString(string key)
Parameters
Type Name Description
string key
Returns
Type Description
string

Remove(string)

Removes a key from the dictionary when present.

Declaration
public void Remove(string key)
Parameters
Type Name Description
string key

SetBoolean(string, bool)

Sets a boolean value for the given key.

Declaration
public void SetBoolean(string key, bool value)
Parameters
Type Name Description
string key
bool value

SetDate(string, DateTime)

Sets a date value in PDF date string format.

Declaration
public void SetDate(string key, DateTime value)
Parameters
Type Name Description
string key
DateTime value

SetInteger(string, long)

Sets an integer value for the given key.

Declaration
public void SetInteger(string key, long value)
Parameters
Type Name Description
string key
long value

SetName(string, string)

Sets a name object value for the given key.

Declaration
public void SetName(string key, string value)
Parameters
Type Name Description
string key
string value

SetString(string, string)

Sets a literal string value for the given key.

Declaration
public void SetString(string key, string value)
Parameters
Type Name Description
string key
string value
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX