Skip to content

PDFCosDictionary

Namespace: O2S.Components.PDF4NET.Core.Cos

Defines a PDF COS dictionary.

public class PDFCosDictionary : PDFCosObject

Inheritance ObjectPDFCosObjectPDFCosDictionary

Constructors

PDFCosDictionary()

Initializes a new PDFCosDictionary object.

public PDFCosDictionary()

Properties

Count

Gets the number of key/value pairs contained in the Dictionary.

public int Count { get; }

Property Value

Int32


Item

public PDFCosObject Item { get; set; }

Property Value

PDFCosObject


Item

public PDFCosObject Item { get; set; }

Property Value

PDFCosObject


Keys

Gets a collection containing the keys in the Dictionary.

public String[] Keys { get; }

Property Value

String[]
A string array containing the keys in the Dictionary.


Type

Gets the object type.

public PDFCosObjectType Type { get; }

Property Value

PDFCosObjectType


Methods

GetKeyValueAsBool(PDFCosName, Boolean)

Gets the value of the specified key as a boolean.

public bool GetKeyValueAsBool(PDFCosName key, bool defaultValue)

Parameters

key PDFCosName
Key to return.

defaultValue Boolean
Default value to return if the key does not exist.

Returns

Boolean
The key value


GetKeyValueAsNumber(PDFCosName, Double)

Gets the value of the specified key as a double.

public double GetKeyValueAsNumber(PDFCosName key, double defaultValue)

Parameters

key PDFCosName
Key to return.

defaultValue Double
Default value to return if the key does not exist.

Returns

Double
The key value


GetKeyValueAsString(PDFCosName, String)

Gets the value of the specified key as a string.

public string GetKeyValueAsString(PDFCosName key, string defaultValue)

Parameters

key PDFCosName
Key to return.

defaultValue String
Default value to return if the key does not exist.

Returns

String
The key value


ToString()

Returns a String that represents the current Object.

public string ToString()

Returns

String
String that represents the current Object.