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
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
PdfArraya PdfArray that has to be added to the array
PdfArray(PdfObject)
Constructs an PdfArray -object, containing 1 PdfObject .
public PdfArray(PdfObject obj)
Parameters
obj
PdfObjecta PdfObject that has to be added to the array
Fields
arrayList
membervariables
protected List<PdfObject> arrayList
Field Value
Properties
ArrayList
methods overriding some methods in PdfObject
public IList<PdfObject> ArrayList { get; }
Property Value
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
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
intThe index at which the specified element is to be inserted
element
PdfObjectThe element to be inserted
Add(int[])
public virtual bool Add(int[] values)
Parameters
values
int[]
Returns
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
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
PdfObjectThe PdfObject to add
Contains(PdfObject)
public bool Contains(PdfObject obj)
Parameters
obj
PdfObject
Returns
GetAsArray(int)
public PdfArray GetAsArray(int idx)
Parameters
idx
int
Returns
GetAsBoolean(int)
public PdfBoolean GetAsBoolean(int idx)
Parameters
idx
int
Returns
GetAsDict(int)
more of the same like PdfDictionary. (MAS 2/17/06)
public PdfDictionary GetAsDict(int idx)
Parameters
idx
int
Returns
GetAsIndirectObject(int)
public PdfIndirectReference GetAsIndirectObject(int idx)
Parameters
idx
int
Returns
GetAsName(int)
public PdfName GetAsName(int idx)
Parameters
idx
int
Returns
GetAsNumber(int)
public PdfNumber GetAsNumber(int idx)
Parameters
idx
int
Returns
GetAsStream(int)
public PdfStream GetAsStream(int idx)
Parameters
idx
int
Returns
GetAsString(int)
public PdfString GetAsString(int idx)
Parameters
idx
int
Returns
GetDirectObject(int)
public PdfObject GetDirectObject(int idx)
Parameters
idx
int
Returns
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
intThe index of the element to be removed.
Returns
ToPdf(PdfWriter, Stream)
public override void ToPdf(PdfWriter writer, Stream os)
Parameters
ToString()
methods concerning the ArrayList-membervalue
public override string ToString()