Class PdfDictionary
Represents a PDF dictionary object.
public class PdfDictionary : PdfObject, ICloneable, IEnumerable<KeyValuePair<string, PdfItem?>>, IEnumerable
- Inheritance
-
PdfDictionary
- Implements
- Derived
- Inherited Members
Constructors
PdfDictionary()
Initializes a new instance of the PdfDictionary class.
public PdfDictionary()
PdfDictionary(PdfDictionary)
Initializes a new instance from an existing dictionary. Used for object type transformation.
protected PdfDictionary(PdfDictionary dict)
Parameters
dict
PdfDictionary
PdfDictionary(PdfDocument)
Initializes a new instance of the PdfDictionary class.
public PdfDictionary(PdfDocument document)
Parameters
document
PdfDocumentThe document.
Properties
Elements
Gets the dictionary containing the elements of this dictionary.
public PdfDictionary.DictionaryElements Elements { get; }
Property Value
Stream
Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function.
public PdfDictionary.PdfStream Stream { get; set; }
Property Value
Methods
Clone()
Creates a copy of this dictionary. Direct values are deep copied. Indirect references are not modified.
public PdfDictionary Clone()
Returns
Copy()
This function is useful for importing objects from external documents. The returned object is not yet complete. irefs refer to external objects and directed objects are cloned but their document property is null. A cloned dictionary or array needs a 'fix-up' to be a valid object.
protected override object Copy()
Returns
CreateStream(byte[])
Creates the stream of this dictionary and initializes it with the specified byte array. The function must not be called if the dictionary already has a stream.
public PdfDictionary.PdfStream CreateStream(byte[] value)
Parameters
value
byte[]
Returns
GetEnumerator()
Returns an enumerator that iterates through the dictionary elements.
public IEnumerator<KeyValuePair<string, PdfItem?>> GetEnumerator()
Returns
ToString()
Returns a string with the content of this object in a readable form. Useful for debugging purposes only.
public override string ToString()