Pdf parser - changed new line indicator to "</br>"(just visual thing), more line deleting rules. (v1.0.1)
This commit is contained in:
parent
161074ff75
commit
dff7499093
1 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ class PdfTextParser @Inject constructor(private val application: Application) :
|
||||||
val stringWithIds = mutableListOf<StringWithId>()
|
val stringWithIds = mutableListOf<StringWithId>()
|
||||||
|
|
||||||
val pdfStripper = PDFTextStripper()
|
val pdfStripper = PDFTextStripper()
|
||||||
pdfStripper.paragraphStart = "_new_line_"
|
pdfStripper.paragraphStart = "</br>"
|
||||||
|
|
||||||
val oldText = pdfStripper.getText(document)
|
val oldText = pdfStripper.getText(document)
|
||||||
.replace("\r", "")
|
.replace("\r", "")
|
||||||
|
|
@ -58,7 +58,7 @@ class PdfTextParser @Inject constructor(private val application: Application) :
|
||||||
line.all {
|
line.all {
|
||||||
if (it == ' ') {
|
if (it == ' ') {
|
||||||
true
|
true
|
||||||
} else if (it.isUpperCase() || it.isDigit()) {
|
} else if (it.isUpperCase() || it.isDigit() || it == '-') {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue