iText 8.0.5 API
iText.Kernel.Pdf.PdfTextArray Class Reference

PdfTextArray defines an array with displacements and PdfString -objects. More...

Inheritance diagram for iText.Kernel.Pdf.PdfTextArray:
iText.Kernel.Pdf.PdfArray iText.Kernel.Pdf.PdfObject

Public Member Functions

override void  Add (PdfObject pdfObject)
 
override void  AddAll (PdfArray a)
  Adds content of the PdfArray. More...
 
override void  AddAll (ICollection< PdfObject > c)
  Adds the Collection of PdfObjects. More...
 
virtual bool  Add (float number)
 
virtual bool  Add (String text, PdfFont font)
 
virtual bool  Add (byte[] text)
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfArray
  PdfArray ()
  Create a new, empty PdfArray. More...
 
  PdfArray (PdfObject obj)
  Create a new PdfArray with the provided PdfObject as the first item in the array. More...
 
  PdfArray (iText.Kernel.Pdf.PdfArray arr)
  Create a new PdfArray. More...
 
  PdfArray (Rectangle rectangle)
  Create a new PdfArray. More...
 
  PdfArray (IList< PdfObject > objects)
  Create a new PdfArray. More...
 
  PdfArray (float[] numbers)
  Create a new PdfArray filled with the values in the float[] as PdfNumber. More...
 
  PdfArray (double[] numbers)
  Create a new PdfArray filled with the values in the double[] as PdfNumber. More...
 
  PdfArray (int[] numbers)
  Create a new PdfArray filled with the values in the int[] as PdfNumber. More...
 
  PdfArray (bool[] values)
  Create a new PdfArray filled with the values in the boolean[] as PdfBoolean. More...
 
  PdfArray (IList< String > strings, bool asNames)
  Create a new PdfArray filled with a list of Strings. More...
 
  PdfArray (IEnumerable< PdfObject > objects, int initialCapacity)
  Create a new PdfArray. More...
 
virtual int  Size ()
 
virtual bool  IsEmpty ()
 
virtual bool  Contains (PdfObject o)
 
virtual IEnumerator< PdfObject GetEnumerator ()
  Returns an iterator over an array of PdfObject elements. More...
 
virtual void  Add (int index, PdfObject element)
  Adds the specified PdfObject at the specified index. More...
 
virtual PdfObject  Set (int index, PdfObject element)
  Sets the PdfObject at the specified index in the PdfArray. More...
 
virtual void  AddAll (iText.Kernel.Pdf.PdfArray a)
  Adds content of the PdfArray. More...
 
virtual PdfObject  Get (int index)
  Gets the (direct) PdfObject at the specified index. More...
 
virtual void  Remove (int index)
  Removes the PdfObject at the specified index. More...
 
virtual void  Remove (PdfObject o)
  Removes the first occurrence of the specified PdfObject, if it is present. More...
 
virtual void  Clear ()
 
virtual int  IndexOf (PdfObject o)
  Gets the first index of the specified PdfObject. More...
 
virtual IList< PdfObject SubList (int fromIndex, int toIndex)
  Returns a sublist of this PdfArray, starting at fromIndex (inclusive) and ending at toIndex (exclusive). More...
 
virtual IList< PdfObject ToList ()
  Returns unmodifiable System.Collections.IList representation of this PdfArray. More...
 
override byte  GetObjectType ()
  Gets object type. More...
 
override String  ToString ()
 
virtual PdfObject  Get (int index, bool asDirect)
 
virtual iText.Kernel.Pdf.PdfArray  GetAsArray (int index)
  Returns the element at the specified index as a PdfArray. More...
 
virtual PdfDictionary  GetAsDictionary (int index)
  Returns the element at the specified index as a PdfDictionary. More...
 
virtual PdfStream  GetAsStream (int index)
  Returns the element at the specified index as a PdfStream. More...
 
virtual PdfNumber  GetAsNumber (int index)
  Returns the element at the specified index as a PdfNumber. More...
 
virtual PdfName  GetAsName (int index)
  Returns the element at the specified index as a PdfName. More...
 
virtual PdfString  GetAsString (int index)
  Returns the element at the specified index as a PdfString. More...
 
virtual PdfBoolean  GetAsBoolean (int index)
  Returns the element at the specified index as a PdfBoolean. More...
 
virtual Rectangle  ToRectangle ()
  Returns the first four elements of this array as a PdfArray. More...
 
virtual float[]  ToFloatArray ()
  Returns this array as an array of floats. More...
 
virtual double[]  ToDoubleArray ()
  Returns this array as an array of doubles. More...
 
virtual long[]  ToLongArray ()
  Returns this array as an array of longs. More...
 
virtual int[]  ToIntArray ()
  Returns this array as an array of ints. More...
 
virtual bool[]  ToBooleanArray ()
  Returns this array as an array of booleans. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObject
void  Flush ()
  Flushes the object to the document. More...
 
void  Flush (bool canBeInObjStm)
  Flushes the object to the document. More...
 
virtual PdfIndirectReference  GetIndirectReference ()
  Gets the indirect reference associated with the object. More...
 
virtual bool  IsIndirect ()
  Checks if object is indirect. More...
 
virtual PdfObject  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object to be saved as indirect. More...
 
virtual PdfObject  MakeIndirect (PdfDocument document)
  Marks object to be saved as indirect. More...
 
virtual bool  IsFlushed ()
  Indicates is the object has been flushed or not. More...
 
virtual bool  IsModified ()
  Indicates is the object has been set as modified or not. More...
 
virtual PdfObject  Clone ()
  Creates clone of the object which belongs to the same document as original object. More...
 
virtual PdfObject  Clone (ICopyFilter filter)
  Creates clone of the object which belongs to the same document as original object. More...
 
virtual PdfObject  CopyTo (PdfDocument document)
  Copies object to a specified document. More...
 
virtual PdfObject  CopyTo (PdfDocument document, bool allowDuplicating)
  Copies object to a specified document. More...
 
virtual PdfObject  CopyTo (PdfDocument document, ICopyFilter copyFilter)
  Copies object to a specified document. More...
 
virtual PdfObject  CopyTo (PdfDocument document, bool allowDuplicating, ICopyFilter copyFilter)
  Copies object to a specified document. More...
 
virtual PdfObject  SetModified ()
  Sets the 'modified' flag to the indirect object, the flag denotes that the object was modified since the document opening. More...
 
virtual bool  IsReleaseForbidden ()
  Checks if it's forbidden to release this PdfObject instance. More...
 
virtual void  Release ()
 
virtual bool  IsNull ()
  Checks if this PdfObject is of the type PdfNull. More...
 
virtual bool  IsBoolean ()
  Checks if this PdfObject is of the type PdfBoolean. More...
 
virtual bool  IsNumber ()
  Checks if this PdfObject is of the type PdfNumber. More...
 
virtual bool  IsString ()
  Checks if this PdfObject is of the type PdfString. More...
 
virtual bool  IsName ()
  Checks if this PdfObject is of the type PdfName. More...
 
virtual bool  IsArray ()
  Checks if this PdfObject is of the type PdfArray. More...
 
virtual bool  IsDictionary ()
  Checks if this PdfObject is of the type PdfDictionary. More...
 
virtual bool  IsStream ()
  Checks if this PdfObject is of the type PdfStream. More...
 
virtual bool  IsIndirectReference ()
  Checks if this PdfObject is of the type PdfIndirectReference. More...
 
virtual bool  IsLiteral ()
  Checks if this PdfObject is of the type PdfLiteral. More...
 

Package Functions

virtual bool  Add (String text)
 
- Package Functions inherited from iText.Kernel.Pdf.PdfArray
override PdfObject  NewInstance ()
  Creates new instance of object. More...
 
override void  CopyContent (PdfObject from, PdfDocument document, ICopyFilter copyFilter)
  Copies object content from object 'from'. More...
 
virtual void  ReleaseContent ()
  Release content of PdfArray. More...
 
- Package Functions inherited from iText.Kernel.Pdf.PdfObject
virtual PdfObject  SetIndirectReference (PdfIndirectReference indirectReference)
 
virtual bool  CheckState (short state)
  Checks state of the flag of current object. More...
 
virtual PdfObject  SetState (short state)
  Sets special states of current object. More...
 
virtual PdfObject  ClearState (short state)
  Clear state of the flag of current object. More...
 
virtual void  CopyContent (PdfObject from, PdfDocument document)
  Copies object content from object 'from'. More...
 

Additional Inherited Members

- Static Public Attributes inherited from iText.Kernel.Pdf.PdfObject
const byte  ARRAY = 1
 
const byte  BOOLEAN = 2
 
const byte  DICTIONARY = 3
 
const byte  LITERAL = 4
 
const byte  INDIRECT_REFERENCE = 5
 
const byte  NAME = 6
 
const byte  NULL = 7
 
const byte  NUMBER = 8
 
const byte  STREAM = 9
 
const byte  STRING = 10
 
- Package Attributes inherited from iText.Kernel.Pdf.PdfArray
IList< PdfObject list
 
- Package Attributes inherited from iText.Kernel.Pdf.PdfObject
PdfIndirectReference  indirectReference = null
  If object is flushed the indirect reference is kept here. More...
 
- Static Package Attributes inherited from iText.Kernel.Pdf.PdfObject
const short  FLUSHED = 1
  Indicates if the object has been flushed. More...
 
const short  FREE = 1 << 1
  Indicates that the indirect reference of the object could be reused or have to be marked as free. More...
 
const short  READING = 1 << 2
  Indicates that definition of the indirect reference of the object still not found (e.g. keys in XRefStm). More...
 
const short  MODIFIED = 1 << 3
  Indicates that object changed (is used in append mode). More...
 
const short  ORIGINAL_OBJECT_STREAM = 1 << 4
  Indicates that the indirect reference of the object represents ObjectStream from original document. More...
 
const short  MUST_BE_FLUSHED = 1 << 5
  For internal usage only. More...
 
const short  MUST_BE_INDIRECT = 1 << 6
  Indicates that the object shall be indirect when it is written to the document. More...
 
const short  FORBID_RELEASE = 1 << 7
  Indicates that the object is highly sensitive and we do not want to release it even if release() is called. More...
 
const short  READ_ONLY = 1 << 8
  Indicates that we do not want this object to be ever written into the resultant document (because of multiple objects read from the same reference inconsistency). More...
 
const short  UNENCRYPTED = 1 << 9
  Indicates that this object is not encrypted in the encrypted document. More...
 

Detailed Description

PdfTextArray defines an array with displacements and PdfString -objects.

PdfTextArray defines an array with displacements and PdfString -objects.

A PdfTextArray is used with the operator TJ in iText.Kernel.Pdf.Canvas.PdfCanvas. The first object in this array has to be a PdfString ; see reference manual version 1.3 section 8.7.5, pages 346-347. OR see reference manual version 1.6 section 5.3.2, pages 378-379. To emit a more efficient array, we consolidate repeated numbers or strings into single array entries. For example: "add( 50 ); add( -50 );" will REMOVE the combined zero from the array.

Member Function Documentation

◆ AddAll() [1/2]

override void iText.Kernel.Pdf.PdfTextArray.AddAll ( ICollection< PdfObject c )
inlinevirtual

Adds the Collection of PdfObjects.

Parameters
c the Collection of PdfObjects to be added
See also
System.Collections.IList.AddAll(System.Collections.ICollection)

Reimplemented from iText.Kernel.Pdf.PdfArray.

◆ AddAll() [2/2]

override void iText.Kernel.Pdf.PdfTextArray.AddAll ( PdfArray  a )
inline

Adds content of the PdfArray.

Parameters
a the PdfArray to be added
See also
System.Collections.IList.AddAll(System.Collections.ICollection)