Hello, Mr. Hausherr.
Thanks for you, now I can get space information.
I corrected my code that I sent 2 days ago.
========================
String p_text = stripper.getText(doc);
Iterator<String> it_str = Arrays.asList(p_text.split("")).iterator();
int ind_tp = 0;
List<TextPosition> list_tp = stripper.list_text;
int len_list_tp = list_tp.size();
while (it_str.hasNext()) {
String ch = it_str.next();
String str_rec = "Text: " + ch;
if (ind_tp < len_list_tp) {
TextPosition tp = list_tp.get(ind_tp);
if (ch.equals(tp.toString())){
str_rec += "\tx: " + tp.getX()
+ "\ty: " + tp.getY()
+ "\tw: " + tp.getWidth()
+ "\th: " + tp.getHeight()
+ "\tfont_size: " + tp.getFontSizeInPt();
ind_tp++;
}
}
System.out.println(str_rec);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]