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 StringConstructs string output from the providedIOcrEngine.doImageOcr(java.io.File)result.static voidgenerifyWordBBoxesByLine(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 voidsortTextInfosByLines(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.
-