[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.IPdfArrayExt

IPdfArrayExt Class

Contains extension methods for the IPdfArray interface, allows working with PdfArray and PdfArrayObject in the same way.

Inheritance
IPdfArrayExt
Namespace: GrapeCity.Documents.Pdf.Spec
Assembly: DS.Documents.Pdf.dll
Syntax
public static class IPdfArrayExt
Public Module IPdfArrayExt

Methods

Name Description
Add(IPdfArray, IPdfObject)

Adds an item to the IPdfArray.

AddString(IPdfArray, string)

Adds a string to the IPdfArray.

AsArray<T>(IPdfArray)

Converts all elements of this IPdfArray to T, and copies the converted values to a new array of T.

Returns null if some elements can't be converted to a T.

AsBoolArray(IPdfArray)

Converts all elements of this IPdfArray to bool values, and copies the converted values to a new array of bool.

Returns null if some elements can't be converted to a bool.

AsDictArray(IPdfArray)

Converts all elements of this IPdfArray to IPdfDict, and copies the converted values to a new array of IPdfDict.

Returns null if some elements can't be converted to a IPdfDict.

AsFloatArray(IPdfArray)

Converts all elements of this IPdfArray to float values, and copies the converted values to a new array of floats.

Returns null if some elements can't be converted to an float.

AsIntArray(IPdfArray)

Converts all elements of this IPdfArray to integer values, and copies the converted values to a new array of integers.

Returns null if some elements can't be converted to an integer.

AsNameArray(IPdfArray)

Converts all elements of this IPdfArray to PdfName, and copies the converted values to a new array of PdfName.

Returns null if some elements can't be converted to a PdfName.

AsNameArrayStr(IPdfArray)

Converts all elements of this IPdfArray to PdfName, and copies the converted values to a new array of string.

Returns null if some elements can't be converted to a PdfName.

AsRefArray(IPdfArray, bool)

Converts all elements of this IPdfArray to IPdfRef, and copies the converted values to a new array of IPdfRef.

Returns null if some elements can't be converted to a IPdfRef.

AsStringArray(IPdfArray)

Converts all elements of this IPdfArray to string values, and copies the converted values to a new array of strings.

Returns null if some elements can't be converted to a string.

Clear(IPdfArray)

Clears the IPdfArray.

Count(IPdfArray)

Gets the count of items in the IPdfArray.

GetArray<T>(IPdfArray, int, bool, bool, bool)

Gets the array of T objects at the specified index. Returns null if the array does not exist or cannot be converted to an array of T.

GetEnum<T>(IPdfArray, int, T?)

Gets the nullable enum value at the specified index. If the value does not exist or cannot be converted to an enum, returns defValue (which can be null).

GetEnum<T>(IPdfArray, int, T)

Gets the enum value at the specified index. If the value does not exist or cannot be converted to an enum, returns defValue.

GetFloat(IPdfArray, int, float?)

Gets the float value at the specified index.

If the value cannot be converted to a float, returns defValue and adds a warning to GrapeCity.Documents.Pdf.GcPdfDocument.ParserLog.

GetFloat(IPdfArray, int, float)

Gets the float value at the specified index.

Returns defValue if the value cannot be converted to a float.

GetFloatArray(IPdfArray, int, bool)

Gets the Float array at the specified index.

GetInt(IPdfArray, int, int)

Gets the int value at the specified index.

Returns defValue if the value cannot be converted to an int.

GetInt(IPdfArray, int, int?)

Gets the nullable int value at the specified index.

Returns defValue if the value cannot be converted to an int.

GetIntArray(IPdfArray, int, bool)

Gets the Integer array at the specified index.

GetItem(IPdfArray, int)

Gets an item at specified index.

GetName(IPdfArray, int, string)

Gets the PDF name at the specified index as a string.

Returns defValue if the value cannot be converted to a string.

GetNameArray(IPdfArray, int, bool)

Gets the PDF Name array at the specified index.

GetNameArrayStr(IPdfArray, int, bool)

Gets the PDF Name array at the specified index, the PDF Name array represented as string.

GetPdfStringBytes(IPdfArray, int)

Gets the bytes of the IPdfString at the specified index. If the value does not exist or cannot be converted to an IPdfString, returns null.

GetString(IPdfArray, int, string)

Gets the string at the specified index.

Returns defValue if the value cannot be converted to a string.

Get<T>(IPdfArray, int, bool)

Gets the value at the specified index, returns a null if the value cannot be converted to a T. Note! This method returns IPdfRef if T is IPdfRef, otherwise the method resolves the reference and returns actual object. Use GetItem(IPdfArray, int) method if you want to return "raw" value without any post-processing.

Insert(IPdfArray, int, IPdfObject)

Insert an item into IPdfArray.

RemoveAt(IPdfArray, int)

Removes an item with specified index.

RemoveRange(IPdfArray, int, int)

Removes a range of items.

Set(IPdfArray, int, IPdfObject)

Sets the value at the specified index.

SetCount(IPdfArray, int)

Sets the count of items in the array to a specified value. If the current count of items is less than count, pads the array with Instance objects. If the current count is greater than count, removes items from the end of the array.

SetPdfStringBytes(IPdfArray, int, byte[])

Sets the IPdfString at the specified index. If the value is null, sets the item to PdfNull.

SetSilent(IPdfArray, int, IPdfObject)

Sets a value associated with a specified index. This method does not affect the value of Changed property.

TryAsArray<T>(IPdfArray, out T[], bool, bool)

Tries to convert all elements of this IPdfArray to T, and copies the converted values to a new array of T. Returns true if all elements can be converted to a T or they are PDF Null and allowNulls is true.

TryAsRect(IPdfArray, out IPdfNumber, out IPdfNumber, out IPdfNumber, out IPdfNumber)

Tries to convert the array to rectangle, the array should have 4 elements and all are numbers.

TryGetArray<T>(IPdfArray, int, out T[], bool)

Tries to get the array at the specified index, if the value does not exist or cannot be converted to an array of T returns false.

TryGetArray<T>(IPdfArray, int, out T[], bool, bool, bool)

Tries to get the array of T objects at the specified index.

TryGetBool(IPdfArray, int, out bool)

Tries to get the bool value with the specified index.

TryGetEnum<T>(IPdfArray, int, out T)

Tries to get the enum value at the specified index. If the value does not exist or cannot be converted to an enum, returns false.

TryGetFloat(IPdfArray, int, out float?, bool)

Tries to get the nullable float value at the specified index.

TryGetFloat(IPdfArray, int, out float, bool)

Tries to get the float value at the specified index.

TryGetFloatArray(IPdfArray, int, out float[], bool)

Tries to get the Float array at the specified index.

TryGetInt(IPdfArray, int, out int, bool)

Tries to get the int value at the specified index.

TryGetIntArray(IPdfArray, int, out int[], bool)

Tries to get the Integer array at the specified index.

TryGetName(IPdfArray, int, out string)

Tries to get the PDF name value with the specified index as a string.

TryGetNameArray(IPdfArray, int, out PdfName[], bool)

Tries to get the PDF Name array at the specified index.

TryGetNameArrayStr(IPdfArray, int, out string[], bool)

Tries to get the PDF Name array at the specified index, the PDF Name array represented as string.

TryGetString(IPdfArray, int, out string)

Tries to get the string value with the specified index.

TryGet<T>(IPdfArray, int, out T, bool)

Tries to get the value at the specified index. Note! This method returns IPdfRef if T is IPdfRef, otherwise the method resolves the reference and returns actual object.

TryGet<T>(IPdfArray, int, out T, out bool, bool)

Tries to get the value at the specified index. Returns true if value exists and can be converted to a T, resolves a PDF reference if needed. Note! The method does not resolve reference if T is IPdfRef, otherwise the method resolves the reference and returns actual object.