Package com.itextpdf.kernel.pdf
Class PdfTextArray
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObject
-
- com.itextpdf.kernel.pdf.PdfArray
-
- com.itextpdf.kernel.pdf.PdfTextArray
-
- All Implemented Interfaces:
java.lang.Iterable<PdfObject>
public class PdfTextArray extends PdfArray
PdfTextArray
defines an array with displacements andPdfString
-objects.A
PdfTextArray
is used with the operator TJ inPdfCanvas
. The first object in this array has to be aPdfString
; 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.
-
-
Field Summary
Fields Modifier and Type Field Description private float
lastNumber
private java.lang.StringBuilder
lastString
-
Fields inherited from class com.itextpdf.kernel.pdf.PdfObject
ARRAY, BOOLEAN, DICTIONARY, FLUSHED, FORBID_RELEASE, FREE, INDIRECT_REFERENCE, indirectReference, LITERAL, MODIFIED, MUST_BE_FLUSHED, MUST_BE_INDIRECT, NAME, NULL, NUMBER, ORIGINAL_OBJECT_STREAM, READ_ONLY, READING, STREAM, STRING, UNENCRYPTED
-
-
Constructor Summary
Constructors Constructor Description PdfTextArray()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(byte[] text)
boolean
add(float number)
void
add(PdfObject pdfObject)
protected boolean
add(java.lang.String text)
boolean
add(java.lang.String text, PdfFont font)
void
addAll(PdfArray a)
Adds content of thePdfArray
.void
addAll(java.util.Collection<PdfObject> c)
Adds the Collection of PdfObjects.-
Methods inherited from class com.itextpdf.kernel.pdf.PdfArray
add, clear, contains, copyContent, get, get, getAsArray, getAsBoolean, getAsDictionary, getAsName, getAsNumber, getAsStream, getAsString, getType, indexOf, isEmpty, iterator, newInstance, releaseContent, remove, remove, set, size, subList, toBooleanArray, toDoubleArray, toFloatArray, toIntArray, toList, toLongArray, toRectangle, toString
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObject
checkState, clearState, clone, clone, containsIndirectReference, copyContent, copyTo, copyTo, copyTo, copyTo, equalContent, flush, flush, getIndirectReference, isArray, isBoolean, isDictionary, isFlushed, isIndirect, isIndirectReference, isLiteral, isModified, isName, isNull, isNumber, isReleaseForbidden, isStream, isString, makeIndirect, makeIndirect, processCopying, processCopying, release, setIndirectReference, setModified, setState
-
-
-
-
Method Detail
-
addAll
public void addAll(PdfArray a)
Adds content of thePdfArray
.
-
addAll
public void addAll(java.util.Collection<PdfObject> c)
Adds the Collection of PdfObjects.
-
add
public boolean add(float number)
-
add
public boolean add(java.lang.String text, PdfFont font)
-
add
public boolean add(byte[] text)
-
add
protected boolean add(java.lang.String text)
-
-