Table of Contents

Class PdfArray.ArrayElements

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Represents the elements of a PdfArray.

public sealed class PdfArray.ArrayElements : ElementsBase
Inheritance
object
PdfArray.ArrayElements
Inherited Members

Properties

Count

Gets the number of elements in the array.

IsFixedSize

Returns false.

IsReadOnly

Returns false.

IsSynchronized

Returns false.

this[int]

Gets or sets an item at the specified index.

Items

Gets all items of this array.

SyncRoot

The current implementation return null.

Methods

Add(PdfItem)

Appends the specified object to the array.

Clear()

Removes all items from the array.

Clone()

Creates a shallow copy of this object.

Contains(PdfItem)

Determines whether the specified value is in the array.

CopyTo(PdfItem[], int)

Copies the elements of the array to the specified array.

GetArray(int, VCF, Type?)

Gets the PdfArray with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfArray is returned.

GetArray<T>(int, VCF)
GetBoolean(int)

Gets the boolean value for the specified index. If the value exists but is neither a boolean nor a PDF reference to a boolean, the function throws an InvalidOperationException.

GetDictionary(int, VCF, Type?)

Gets the PdfDictionary with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfDictionary is returned.

GetDictionary<T>(int, VCF)
GetEnumerator()

Returns an enumerator that iterates through the array.

GetInteger(int)

Gets the integer value for the specified index. If the value exists but is neither an integer nor a PDF reference to an integer, the function throws an InvalidOperationException.

GetLongInteger(int)

Gets the long integer value for the specified index. If the value exists but is neither an integer or a long integer nor a PDF reference to an integer or a long integer, the function throws an InvalidOperationException.

GetName(int)

Gets the name value for the specified index. If the value exists but is neither a name nor a PDF reference to a name, the function throws an InvalidOperationException.

GetNullableReal(int)

Gets the double? value for the specified index. If the value exists but is neither a null object nor a real or integer nor a PDF reference to a null object, a real or integer, the function throws an InvalidOperationException.

GetObject(int, VCF, Type?)

Gets the PdfObject with the specified index, or null if no such object exists. If the index refers to a reference, the referenced PdfObject is returned.

GetObject<T>(int, VCF)

Gets a PDF object of type T from the specified index. If the found object is a PDF reference or a PDF container (array or dictionary) but not of type T it is tried to be transformed into this type and replaces the old object. If the transformation is not possible, e.g. because T does not match with the found type, an exception is thrown. Returns null if the found object is neither a PDF reference nor a PDF container.

GetReal(int)

Gets the real value for the specified index. If the value exists but is neither an integer nor a real nor a PDF reference to an integer or a real, the function throws an InvalidOperationException.

GetReference(int)

Gets a PDF reference from the specified index, or null if no such object exists.

GetRequiredArray(int, VCF, Type?)

Gets the PdfArray with the specified index. An InvalidOperationException is thrown if the object does not exist. If the index refers to a reference, the referenced PdfArray is returned.

GetRequiredArray<T>(int, VCF)
GetRequiredDictionary(int, VCF, Type?)
GetRequiredDictionary<T>(int, VCF)
GetRequiredObject(int, VCF, Type?)
GetRequiredObject<T>(int, VCF)
GetRequiredReference(int)

Gets a PDF reference from the specified index, or throws an exception, if no such object exists.

GetRequiredValue(int, VCF, Type?)
  • throws if valueType does not match
GetRequiredValue<T>(int, VCF)
  • throws if result is not of type T.
GetString(int)

Gets the string value for the specified index. If the value exists but is neither a string nor a PDF reference to a string, the function throws an InvalidOperationException.

GetValue(int, VCF, Type?)

// TODO Gets the value for the specified key. Unsinn: If the value does not exist, it is optionally created.

GetValue<T>(int, VCF)
  • throws if result is not of type T.
IndexOf(PdfItem)

Gets the index of the specified item.

Insert(int, PdfItem)

Inserts the item the specified index.

Remove(PdfItem)

Removes the first occurrence of a specific object from the array/>.

RemoveAt(int)

Removes the item at the specified index.

SetBoolean(int, bool)

Sets the entry to the specified value.

SetInteger(int, int)

Sets the entry to the specified value.

SetLongInteger(int, long)

Sets the entry to the specified value.

SetName(int, string)

Sets a PDF name at the specified index.

SetObject(int, PdfObject)
SetReal(int, double)

Sets the entry to the specified value.

SetReference(int, PdfReference)

Sets the entry to an indirect reference.

SetString(int, string)

Sets the entry to the specified value.

SetValue(int, PdfItem)

Sets the entry with the specified value. DON’T USE THIS FUNCTION - IT MAY BE REMOVED. // PDFsharp/NT

TryGetArray(int, out PdfArray)
TryGetArray(int, out PdfArray, Type?)
TryGetArray<T>(int, out T)
TryGetBoolean(int, out bool)

Tries to get the boolean value for the specified index. Returns true on success, false if value is of wrong type.

TryGetDictionary(int, out PdfDictionary)
TryGetDictionary(int, out PdfDictionary, Type?)
TryGetDictionary<T>(int, out T)
TryGetInteger(int, out int)

Tries to get the integer value for the specified index. Returns true on success, false if value is of wrong type.

TryGetLongInteger(int, out long)

Tries to get the long integer value for the specified index. Returns true on success, false if value is of wrong type.

TryGetName(int, out string)

Tries to get the name value for the specified index. Returns true on success, false if value is of wrong type.

TryGetNullableReal(int, out double?)

Tries to get the double? value for the specified index. Returns true on success, false if value is of wrong type.

TryGetReal(int, out double)

Tries to get the real value for the specified index. Returns true on success, false if value is of wrong type.

TryGetString(int, out string)

Tries to get the string value for the specified index. Returns true on success, false if value is of wrong type.

TryGetValue(int, out PdfItem)
TryGetValue(int, out PdfItem, Type?)
  • throws if result is not of type T.
TryGetValue<T>(int, out T)