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.7' section 3.2.5 (page 58).
. No, because:. We can keep on creating XFA templates based on ISO-32000-1. We can convert PDF 1.7 files with XFA content to PDF 2.0, PDF/A, PDF/UA, document, so it doesn't matter if XFA can or can't be used inside a PDF 2.0 document. XDP and PDF are separate things, let's use XDP instead of PDF (this is a suboptimal option!). IText Pro 1.2.5 – OCR Tool. December 11, 2017. IText Pro could recognize text from any image. You can use iText to extract text from PDF, document in paper, page.
I am trying to migrate my iText dependency to a higher version. Before I used itextpdf-5.4.2.jar and itext-1.3.1.jar.Now I have migrated to itextpdf-5.5.10.jar and itext-4.2.1.jar. After this upgrade, my PDF no longer prints barcodes. Barcodes worked perfectly with the earlier versions. 1.1.6; 1.1.7; 1.1.8; 1.1.9; 1.1.10; 1.1.11; 1.1.12; 1.1.13; 1.2.0; 1.2.1; 1.2.2; 1.2.3; 1.2.4; 1.2.5; 1.2.6; 1.3.0; 1.3.1; 1.3.2; 1.3.3; 1.3.4; 1.3.5. Public class PdfArray extends PdfObject. 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.
- See Also:
PdfObject
Field Summary | |
---|---|
protected java.util.ArrayList | arrayList this is the actual array of PdfObjects |
Fields inherited from class com.lowagie.text.pdf.PdfObject |
---|
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type |
Constructor Summary |
---|
PdfArray() Constructs an empty PdfArray -object. |
PdfArray(java.util.ArrayList l) Constructs a PdfArray , containing all elements of a specified ArrayList . |
PdfArray(float[] values) Constructs a PdfArray -object, containing all float values in a specified array. |
PdfArray(int[] values) Constructs a PdfArray -object, containing all int values in a specified array. |
PdfArray(PdfArray array) Constructs an PdfArray -object, containing all PdfObject s in a specified PdfArray . |
PdfArray(PdfObject object) Constructs an PdfArray -object, containing 1 PdfObject . |
Method Summary | |
---|---|
boolean | add(float[] values) Adds an array of float values to end of the PdfArray . |
boolean | add(int[] values) Adds an array of int values to end of the PdfArray . |
void | add(int index, PdfObject element) Inserts the specified element at the specified position. |
boolean | add(PdfObject object) Adds a PdfObject to the end of the PdfArray . |
void | addFirst(PdfObject object) Inserts a PdfObject at the beginning of the PdfArray . |
boolean | contains(PdfObject object) Checks if the PdfArray already contains a certain PdfObject . |
java.util.ArrayList | getArrayList() Deprecated. |
PdfArray | getAsArray(int idx) Returns a PdfObject as a PdfArray , resolving indirect references. |
PdfBoolean | getAsBoolean(int idx) Returns a PdfObject as a PdfBoolean , resolving indirect references. |
PdfDictionary | getAsDict(int idx) Returns a PdfObject as a PdfDictionary , resolving indirect references. |
PdfIndirectReference | getAsIndirectObject(int idx) Returns a PdfObject as a PdfIndirectReference . |
PdfName | getAsName(int idx) Returns a PdfObject as a PdfName , resolving indirect references. |
PdfNumber | getAsNumber(int idx) Returns a PdfObject as a PdfNumber , resolving indirect references. |
PdfStream | getAsStream(int idx) Returns a PdfObject as a PdfStream , resolving indirect references. |
PdfString | getAsString(int idx) Returns a PdfObject as a PdfString , resolving indirect references. |
PdfObject | getDirectObject(int idx) Returns the PdfObject with the specified index, resolving a possible indirect reference to a direct object. |
PdfObject | getPdfObject(int idx) Returns the PdfObject with the specified index. |
boolean | isEmpty() Returns true if the array is empty. |
java.util.ListIterator | listIterator() Returns the list iterator for the array. |
PdfObject | remove(int idx) Remove the element at the specified position from the array. |
PdfObject | set(int idx, PdfObject obj) Overwrites a specified location of the array, returning the previous value |
int | size() Returns the number of entries in the array. |
void | toPdf(PdfWriter writer, java.io.OutputStream os) Writes the PDF representation of this PdfArray as an array of byte to the specified OutputStream . |
java.lang.String | toString() Returns a string representation of this PdfArray . |
Methods inherited from class com.lowagie.text.pdf.PdfObject |
---|
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
arrayList
- this is the actual array of PdfObjects
Constructor Detail |
---|
PdfArray
- Constructs an empty
PdfArray
-object.
PdfArray
- Constructs an
PdfArray
-object, containing 1PdfObject
.- Parameters:
object
- aPdfObject
that has to be added to the array
PdfArray
- Constructs a
PdfArray
-object, containing allfloat
values in a specified array. Thefloat
values are internally converted toPdfNumber
objects.- Parameters:
values
- an array offloat
values to be added
Itext Pro 1 2 5
PdfArray
- Constructs a
PdfArray
-object, containing allint
values in a specified array. Theint
values are internally converted toPdfNumber
objects.- Parameters:
values
- an array ofint
values to be added
PdfArray
- Constructs a
PdfArray
, containing all elements of a specifiedArrayList
.- Parameters:
l
- anArrayList
withPdfObject
s to be added to the array- Throws:
java.lang.ClassCastException
- if theArrayList
contains something that isn't aPdfObject
- Since:
- 2.1.3
PdfArray
- Constructs an
PdfArray
-object, containing allPdfObject
s in a specifiedPdfArray
.- Parameters:
array
- aPdfArray
to be added to the array
Method Detail |
---|
toPdf
- Writes the PDF representation of this
PdfArray
as an array ofbyte
to the specifiedOutputStream
. - Overrides:
toPdf
in classPdfObject
- Parameters:
writer
- for backwards compatibilityos
- theOutputStream
to write the bytes to.- Throws:
java.io.IOException
toString
- Returns a string representation of this
PdfArray
. The string representation consists of a list of allPdfObject
s contained in thisPdfArray
, enclosed in square brackets ('[]'). Adjacent elements are separated by the characters ', ' (comma and space). - Overrides:
toString
in classPdfObject
- Returns:
- the string representation of this
PdfArray
set
- Overwrites a specified location of the array, returning the previous value
- Parameters:
idx
- The index of the element to be overwrittenobj
- new value for the specified index- Returns:
- the previous value
- Throws:
java.lang.IndexOutOfBoundsException
- if the specified position doesn't exist- Since:
- 2.1.5
remove
- Remove the element at the specified position from the array. Shifts any subsequent elements to the left (subtracts one from their indices).
- Parameters:
idx
- The index of the element to be removed.- Throws:
java.lang.IndexOutOfBoundsException
- the specified position doesn't exist- Since:
- 2.1.5
getArrayList
- Deprecated.
- Get the internal arrayList for this PdfArray. Not Recommended.
- Returns:
- the internal ArrayList. Naughty Naughty.
size
- Returns the number of entries in the array.
- Returns:
- the size of the ArrayList
isEmpty
- Returns
true
if the array is empty. - Returns:
true
if the array is empty- Since:
- 2.1.5
add
- Adds a
PdfObject
to the end of thePdfArray
. ThePdfObject
will be the last element. - Parameters:
object
-PdfObject
to add- Returns:
- always
true
add
- Adds an array of
float
values to end of thePdfArray
. The values will be the last elements. Thefloat
values are internally converted toPdfNumber
objects. - Parameters:
values
- An array offloat
values to add- Returns:
- always
true
add
- Adds an array of
int
values to end of thePdfArray
. The values will be the last elements. Theint
values are internally converted toPdfNumber
objects. - Parameters:
values
- An array ofint
values to add- Returns:
- always
true
add
- 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).
- Parameters:
index
- The index at which the specified element is to be insertedelement
- The element to be inserted- Throws:
java.lang.IndexOutOfBoundsException
- if the specified index is larger than the last position currently set, plus 1.- Since:
- 2.1.5
addFirst
- Inserts a
PdfObject
at the beginning of thePdfArray
. ThePdfObject
will be the first element, any other elements will be shifted to the right (adds one to their indices). - Parameters:
object
- ThePdfObject
to add
contains
- Checks if the
PdfArray
already contains a certainPdfObject
. - Parameters:
object
- ThePdfObject
to check- Returns:
true
listIterator
- Returns the list iterator for the array.
- Returns:
- a ListIterator
getPdfObject
- Returns the
PdfObject
with the specified index. A possible indirect references is not resolved, so the returnedPdfObject
may be either a direct object or an indirect reference, depending on how the object is stored in thePdfArray
. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- A
PdfObject
getDirectObject
- Returns the
PdfObject
with the specified index, resolving a possible indirect reference to a direct object. Thus this method will never return aPdfIndirectReference
object. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- A direct
PdfObject
ornull
getAsDict
- Returns a
PdfObject
as aPdfDictionary
, resolving indirect references. The object corresponding to the specified index is retrieved and resolvedto a direct object. If it is aPdfDictionary
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfDictionary
object, ornull
getAsArray
Itext Pro 1 2 5w
- Returns a
PdfObject
as aPdfArray
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfArray
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfArray
object, ornull
Itext Pro 1 2 5th
getAsStream
- Returns a
PdfObject
as aPdfStream
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfStream
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfStream
object, ornull
getAsString
- Returns a
PdfObject
as aPdfString
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfString
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfString
object, ornull
getAsNumber
- Returns a
PdfObject
as aPdfNumber
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfNumber
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfNumber
object, ornull
getAsName
- Returns a
PdfObject
as aPdfName
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfName
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfName
object, ornull
getAsBoolean
- Returns a
PdfObject
as aPdfBoolean
, resolving indirect references. The object corresponding to the specified index is retrieved and resolved to a direct object. If it is aPdfBoolean
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfBoolean
object, ornull
getAsIndirectObject
- Returns a
PdfObject
as aPdfIndirectReference
. The object corresponding to the specified index is retrieved. If it is aPdfIndirectReference
, it is cast down and returned as such. Otherwisenull
is returned. - Parameters:
idx
- The index of thePdfObject
to be returned- Returns:
- the corresponding
PdfIndirectReference
object, ornull
Overview | Package | Class | Tree | Deprecated | Index | Help |
- Submit New Release
- Edit IText Information
- Submit a New Software
Generate PDF files on the fly.
Itext Pro 1 2 5000
- Applications
- Utilities
- Text
IText is a library that allows you to generate PDF files on the fly.
The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images. The library is especially useful in combination with Java(TM) technology-based Servlets: The look and feel of HTML is browser dependent; with iText and PDF you can control exactly how your servlet's output will look.
- 16589
- LicenseOpen Source