Verified Owner
Top Description Methods
org.jabref.logic.ocr

public Interface OcrEngine

Known Direct Implementers
org.jabref.logic.ocr.OcrMyPdfEngine, org.jabref.logic.ocr.docling.DoclingEngine
Imports
java.io.IOException, java.nio.file.Path

Interface for OCR engines.

Any engine in the future can implement this interface.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the OCR engine (e.g., "OCRmyPDF", "Tesseract").
getName
()

Gets the name of the OCR engine.

public OcrResult

Returns:

the result of the OCR operation with the extracted text or an error message.
performOcrAndEmbedText
(Path
the file to perform OCR on.
pdfPath
)

Performs OCR on the given input file and returns the result, whether the path of the OCRed with searchable text file or the error message.

Method Detail

getNameback to summary
public String getName()

Gets the name of the OCR engine.

Returns:String

the name of the OCR engine (e.g., "OCRmyPDF", "Tesseract").

performOcrAndEmbedTextback to summary
public OcrResult performOcrAndEmbedText(Path pdfPath) throws IOException

Performs OCR on the given input file and returns the result, whether the path of the OCRed with searchable text file or the error message.

Parameters
pdfPath:Path

the file to perform OCR on.

Returns:OcrResult

the result of the OCR operation with the extracted text or an error message.