public class PdfData extends Object
holds text data for extraction and manipulation
Pdf routines create 'raw' text data
grouping routines will attempt to intelligently stitch together and leave as 'processed data' in this class
NOTE ONLY methods (NOT public variables) are part of API
| Modifier and Type | Field and Description |
|---|---|
String[] |
colorTag
hold color content
|
String[] |
contents
hold the raw content
|
float[] |
f_character_spacing
hold raw content
|
int[] |
f_end_font_size
hold raw content
|
int[] |
f_writingMode
hold flag on raw content orientation
|
float[] |
f_x1
hold raw content
|
float[] |
f_x2
hold raw content
|
float[] |
f_y1
hold raw content
|
float[] |
f_y2
hold raw content
|
static int |
HORIZONTAL_LEFT_TO_RIGHT
test orientation
|
static int |
HORIZONTAL_RIGHT_TO_LEFT |
static String |
marker
used to hide our encoding values in fragments of data so we can strip out
|
protected int |
max
initial array size
|
float[] |
space_width
hold raw content
|
int[] |
text_length
hold raw content
|
static int |
VERTICAL_BOTTOM_TO_TOP |
static int |
VERTICAL_TOP_TO_BOTTOM |
| Constructor and Description |
|---|
PdfData()
create empty object to hold content
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRawTextElement(float character_spacing,
int writingMode,
String font_as_string,
float current_space,
int fontSize,
float x1,
float y1,
float x2,
float y2,
StringBuffer processed_line,
int current_text_length,
String currentColorTag,
boolean isXMLExtraction)
store line of raw text for later processing
|
void |
dispose() |
void |
enableTextColorDataExtraction()
set colour extraction
|
void |
flushTextList()
clear store of objects once written out
to reclaim memory.
|
int |
getRawTextElementCount()
get number of raw objects on page
|
boolean |
isColorExtracted()
flag to show if color extracted in xml
|
boolean |
IsEmbedded()
show if width in text
|
void |
widthIsEmbedded()
set flag to show width in text
|
public static final int HORIZONTAL_LEFT_TO_RIGHT
public static final int HORIZONTAL_RIGHT_TO_LEFT
public static final int VERTICAL_TOP_TO_BOTTOM
public static final int VERTICAL_BOTTOM_TO_TOP
public static final String marker
protected int max
public String[] contents
public int[] f_writingMode
public int[] text_length
public float[] f_character_spacing
public int[] f_end_font_size
public float[] space_width
public float[] f_x1
public String[] colorTag
public float[] f_x2
public float[] f_y1
public float[] f_y2
public final int getRawTextElementCount()
public final void flushTextList()
public final void addRawTextElement(float character_spacing,
int writingMode,
String font_as_string,
float current_space,
int fontSize,
float x1,
float y1,
float x2,
float y2,
StringBuffer processed_line,
int current_text_length,
String currentColorTag,
boolean isXMLExtraction)
public void widthIsEmbedded()
public boolean IsEmbedded()
public void enableTextColorDataExtraction()
public boolean isColorExtracted()
public void dispose()
Copyright © 2017. All rights reserved.