Table of Contents

Class PdfArray

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

PdfArray is the PDF Array object. An array is a sequence of PDF objects. An array may contain a mixture of object types. An array is written as a left square bracket ([), followed by a sequence of objects, followed by a right square bracket (]). This object is described in the 'Portable Document Format Reference Manual version 1.3' section 4.6 (page 40). @see PdfObject

public class PdfArray : PdfObject
Inheritance
PdfArray
Derived
Inherited Members

Constructors

PdfArray()

constructors

public PdfArray()

PdfArray(IList<PdfObject>)

Constructs a PdfArray with the elements of an ArrayList. Throws a ClassCastException if the ArrayList contains something that isn't a PdfObject. @since 2.1.3

public PdfArray(IList<PdfObject> l)

Parameters

l IList<PdfObject>

an ArrayList with PdfObjects

PdfArray(int[])

public PdfArray(int[] values)

Parameters

values int[]

PdfArray(float[])

public PdfArray(float[] values)

Parameters

values float[]

PdfArray(PdfArray)

Constructs an PdfArray -object, containing all the PdfObject s in a given PdfArray .

public PdfArray(PdfArray array)

Parameters

array PdfArray

a PdfArray that has to be added to the array

PdfArray(PdfObject)

Constructs an PdfArray -object, containing 1 PdfObject .

public PdfArray(PdfObject obj)

Parameters

obj PdfObject

a PdfObject that has to be added to the array

Fields

arrayList

membervariables

protected List<PdfObject> arrayList

Field Value

List<PdfObject>

Properties

ArrayList

methods overriding some methods in PdfObject

public IList<PdfObject> ArrayList { get; }

Property Value

IList<PdfObject>

an array of byte s

this[int]

Overwrites a specified location of the array. @throws IndexOutOfBoundsException if the specified position doesn't exist @since 2.1.5

public PdfObject this[int idx] { get; set; }

Parameters

idx int

Property Value

PdfObject

the previous value

Size

public int Size { get; }

Property Value

int

Methods

Add(int, PdfObject)

Inserts the specified element at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). @throws IndexOutOfBoundsException if the specified index is larger than the last position currently set, plus 1. @since 2.1.5

public virtual void Add(int index, PdfObject element)

Parameters

index int

The index at which the specified element is to be inserted

element PdfObject

The element to be inserted

Add(int[])

public virtual bool Add(int[] values)

Parameters

values int[]

Returns

bool

Add(float[])

Adds a PdfObject to the PdfArray .

public virtual bool Add(float[] values)

Parameters

values float[]

Returns

bool

true

Add(PdfObject)

public virtual bool Add(PdfObject obj)

Parameters

obj PdfObject

Returns

bool

AddFirst(PdfObject)

Inserts a PdfObject at the beginning of the PdfArray . The PdfObject will be the first element, any other elements will be shifted to the right (adds one to their indices).

public virtual void AddFirst(PdfObject obj)

Parameters

obj PdfObject

The PdfObject to add

Contains(PdfObject)

public bool Contains(PdfObject obj)

Parameters

obj PdfObject

Returns

bool

GetAsArray(int)

public PdfArray GetAsArray(int idx)

Parameters

idx int

Returns

PdfArray

GetAsBoolean(int)

public PdfBoolean GetAsBoolean(int idx)

Parameters

idx int

Returns

PdfBoolean

GetAsDict(int)

more of the same like PdfDictionary. (MAS 2/17/06)

public PdfDictionary GetAsDict(int idx)

Parameters

idx int

Returns

PdfDictionary

GetAsIndirectObject(int)

public PdfIndirectReference GetAsIndirectObject(int idx)

Parameters

idx int

Returns

PdfIndirectReference

GetAsName(int)

public PdfName GetAsName(int idx)

Parameters

idx int

Returns

PdfName

GetAsNumber(int)

public PdfNumber GetAsNumber(int idx)

Parameters

idx int

Returns

PdfNumber

GetAsStream(int)

public PdfStream GetAsStream(int idx)

Parameters

idx int

Returns

PdfStream

GetAsString(int)

public PdfString GetAsString(int idx)

Parameters

idx int

Returns

PdfString

GetDirectObject(int)

public PdfObject GetDirectObject(int idx)

Parameters

idx int

Returns

PdfObject

GetListIterator()

Checks if the PdfArray allready contains a certain PdfObject .

public ListIterator<PdfObject> GetListIterator()

Returns

ListIterator<PdfObject>

true

IsEmpty()

Returns an ArrayList containing PdfObject s.

public bool IsEmpty()

Returns

bool

an ArrayList

Remove(int)

ARRAY CONTENT METHODS

public PdfObject Remove(int idx)

Parameters

idx int

The index of the element to be removed.

Returns

PdfObject

ToPdf(PdfWriter, Stream)

public override void ToPdf(PdfWriter writer, Stream os)

Parameters

writer PdfWriter
os Stream

ToString()

methods concerning the ArrayList-membervalue

public override string ToString()

Returns

string