Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
convertTablesToCSV(Page p,
char delim)
Calls
TableUtils.convertTablesToCSV(Page, char, String) with the specified page, cell delimiter, and
a single linefeed (\n) as a linebreak sequence. |
static java.lang.String[] |
convertTablesToCSV(Page p,
char delim,
java.lang.String linebreak)
Returns an array of CSV-formatted
String s, one for each Table found in the given
page, using the specified character as a cell delimiter and the specified String as a linebreak sequence. |
static java.lang.String |
convertToCSV(Table table,
char delim)
Calls
TableUtils.convertToCSV(Table, char, String) with the specified Table , cell delimiter,
and a single linefeed (\n) as a linebreak sequence. |
static java.lang.String |
convertToCSV(Table table,
char delim,
java.lang.String linebreak)
Returns a CSV-formatted String based on the contents of the given
Table , using
the specified character as a cell delimiter and the specified String as a linebreak
sequence. |
static java.util.List<Table> |
getAllTables(Page p)
|
static java.lang.String[][] |
tableToStrings(Table table)
Returns a two-dimensional array of Strings carrying the contents of the given
Table
in row/cell order. |
public static java.lang.String convertToCSV(Table table, char delim)
TableUtils.convertToCSV(Table, char, String)
with the specified Table
, cell delimiter,
and a single linefeed (\n) as a linebreak sequence.public static java.lang.String convertToCSV(Table table, char delim, java.lang.String linebreak)
Table
, using
the specified character as a cell delimiter and the specified String as a linebreak
sequence.java.io.IOException
- if an error occurs generating the CSV conversionpublic static java.lang.String[][] tableToStrings(Table table)
Table
in row/cell order. For example, this:
String[][] tableText = TableUtils.tableToStrings(pdfxstreamTable); String cell = tableText[0][2];Obtains the textual content of the
pdfxstreamTable
Table
, and singles out
the text of the third cell in the first row of that table.java.io.IOException
- if an error occurs extracting any of the table's textpublic static java.lang.String[] convertTablesToCSV(Page p, char delim, java.lang.String linebreak)
String
s, one for each Table
found in the given
page, using the specified character as a cell delimiter and the specified String as a linebreak sequence.
This is simply a shortcut to applying TableUtils.convertToCSV(Table, char, String)
to each Table
in the given Page
manually.java.io.IOException
- if an error occurs generating the CSV conversionpublic static java.lang.String[] convertTablesToCSV(Page p, char delim)
TableUtils.convertTablesToCSV(Page, char, String)
with the specified page, cell delimiter, and
a single linefeed (\n) as a linebreak sequence.