Namespace: PdfSharp.Pdf
Represents a PDF dictionary object.
public class PdfDictionary : PdfObject, System.ICloneable, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable
Inheritance Object → PdfItem → PdfObject → PdfDictionary
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable
Gets the dictionary containing the elements of this dictionary.
public DictionaryElements Elements { get; }
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 PdfStream Stream { get; set; }
Gets the PdfDocument this object belongs to.
public PdfDocument Owner { get; }
Indicates whether the object is an indirect object.
public bool IsIndirect { get; }
Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.
public PdfObjectInternals Internals { get; }
Gets the indirect reference of this object. If the value is null, this object is a direct object.
public PdfReference Reference { get; internal set; }
Gets the indirect reference of this object. Throws if it is null.
public PdfReference ReferenceNotNull { get; }
InvalidOperationException
The indirect reference must be not null here.
Initializes a new instance of the PdfDictionary class.
public PdfDictionary()
Initializes a new instance of the PdfDictionary class.
public PdfDictionary(PdfDocument document)
document
PdfDocument
The document.
Creates a copy of this dictionary. Direct values are deep copied. Indirect references are not modified.
public PdfDictionary Clone()
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 object Copy()
Returns an enumerator that iterates through the dictionary elements.
public IEnumerator<KeyValuePair<string, PdfItem>> GetEnumerator()
IEnumerator<KeyValuePair<String, PdfItem>>
Returns a string with the content of this object in a readable form. Useful for debugging purposes only.
public string ToString()
internal void WriteObject(PdfWriter writer)
writer
PdfWriter
Writes a key/value pair of this dictionary. This function is intended to be overridden in derived classes.
internal void WriteDictionaryElement(PdfWriter writer, PdfName key)
writer
PdfWriter
key
PdfName
Writes the stream of this dictionary. This function is intended to be overridden in a derived class.
internal void WriteDictionaryStream(PdfWriter writer)
writer
PdfWriter
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 PdfStream CreateStream(Byte[] value)
value
Byte[]