CosDictionary Class

Class for a low-level PDF dictionary object.

Inheritance Hierarchy

System.Object
  BitMiracle.Docotic.Pdf.CosObject
    BitMiracle.Docotic.Pdf.CosDictionary

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public sealed class CosDictionary : CosObject, 
	IEnumerable<KeyValuePair<string, CosObject>>, IEnumerable
VB
Public NotInheritable Class CosDictionary
	Inherits CosObject
	Implements IEnumerable(Of KeyValuePair(Of String, CosObject)), 
	IEnumerable

The CosDictionary type exposes the following members.

Properties

  NameDescription
Public propertyItem
Gets the value associated with the specified key.
Public propertyType
Gets the type of this CosObject.
(Overrides CosObject.Type.)

Methods

  NameDescription
Public methodAddBoolean
Adds the specified key and a new CosBoolean object to the dictionary.
Public methodAddName
Adds the specified key and a new CosName object to the dictionary.
Public methodAddNumber(String, Double)
Adds the specified key and a new real object to the dictionary.
Public methodAddNumber(String, Int64)
Adds the specified key and a new integer object to the dictionary.
Public methodAddString
Adds the specified key and a new CosString object to the dictionary.
Public methodContainsKey
Determines whether this CosDictionary contains the specified key.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemove
Removes the value with the specified key from the CosDictionary.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Gets the value associated with the specified key.

Remarks

A dictionary object is an unordered associative table containing pairs of objects, known as the dictionary's entries. The first element of each entry is the key and the second element is the value.

The key is a CosName object. The value may be any kind of object, including another dictionary. A dictionary entry whose value is CosNull is treated the same as if the entry does not exist.

Multiple entries in the same dictionary shall not have the same key.

An example of a dictionary object in a PDF file:

<< /Type /Page /Parent 3 0 R /MediaBox [0 0 612 792] /Contents 5 0 R >>
.

WARNING: Changes to a COS dictionary might break the owning PDF document.

Use high-level Docotic.Pdf API to edit a document. Don't edit a COS dictionary unless you completely understand what you are doing.

See Also