Package com.itextpdf.pdfocr.util
Class PdfOcrTextBuilder
java.lang.Object
com.itextpdf.pdfocr.util.PdfOcrTextBuilder
Class to build text output from the provided image OCR result and write it to the TXT file.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Constructs string output from the providedIOcrEngine.doImageOcr(java.io.File)
result.static void
generifyWordBBoxesByLine
(Map<Integer, List<TextInfo>> textInfos) Sorts the providedIOcrEngine.doImageOcr(java.io.File)
result by lines and updates line bboxes to match the largest words.static void
sortTextInfosByLines
(Map<Integer, List<TextInfo>> textInfos) Sorts the providedIOcrEngine.doImageOcr(java.io.File)
result by lines.
-
Method Details
-
buildText
Constructs string output from the providedIOcrEngine.doImageOcr(java.io.File)
result. -
generifyWordBBoxesByLine
Sorts the providedIOcrEngine.doImageOcr(java.io.File)
result by lines and updates line bboxes to match the largest words. -
sortTextInfosByLines
Sorts the providedIOcrEngine.doImageOcr(java.io.File)
result by lines.
-