Pdf parser - changed new line indicator to "</br>"(just visual thing), more line deleting rules. (v1.0.1)

This commit is contained in:
acclorite 2024-04-30 15:33:11 +03:00
parent 161074ff75
commit dff7499093

View file

@ -26,7 +26,7 @@ class PdfTextParser @Inject constructor(private val application: Application) :
val stringWithIds = mutableListOf<StringWithId>()
val pdfStripper = PDFTextStripper()
pdfStripper.paragraphStart = "_new_line_"
pdfStripper.paragraphStart = "</br>"
val oldText = pdfStripper.getText(document)
.replace("\r", "")
@ -58,7 +58,7 @@ class PdfTextParser @Inject constructor(private val application: Application) :
line.all {
if (it == ' ') {
true
} else if (it.isUpperCase() || it.isDigit()) {
} else if (it.isUpperCase() || it.isDigit() || it == '-') {
true
} else {
false