Class CosDictionary
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
Class for a low-level PDF dictionary object.
public sealed class CosDictionary : CosObject, IEnumerable<KeyValuePair<string, CosObject>>, IEnumerable
- Inheritance
-
CosDictionary
- Implements
- Inherited Members
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 low-level PDF dictionary object might break the owning PDF document.
Use high-level Docotic.Pdf API to edit a document. Don't edit a low-level PDF dictionary object unless you completely understand what you are doing.
The Docotic.Pdf Library Documentation page contains links to articles, guides, and sample code.
Properties
- this[string]
Gets the value associated with the specified key.
Methods
- AddBoolean(string, bool)
Adds the specified key and a new CosBoolean object to the dictionary.
- AddName(string, string)
Adds the specified key and a new CosName object to the dictionary.
- AddNumber(string, double)
Adds the specified key and a new real object to the dictionary.
- AddNumber(string, long)
Adds the specified key and a new integer object to the dictionary.
- AddString(string, string)
Adds the specified key and a new CosString object to the dictionary.
- ContainsKey(string)
Determines whether this CosDictionary contains the specified key.
- GetEnumerator()
Returns an enumerator that iterates through the collection.
- Remove(string)
Removes the value with the specified key from the CosDictionary.
- TryGetValue(string, out CosObject?)
Gets the value associated with the specified key.