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

public Class OcrMyPdfEngine

extends Object
implements OcrEngine
Class Inheritance
All Implemented Interfaces
org.jabref.logic.ocr.OcrEngine
Imports
java.nio.file.Path, java.util.ArrayList, .List, org.jabref.logic.util.strings.StringUtil, org.slf4j.Logger, .LoggerFactory

Implementation of the OcrEngine interface using OCRmyPDF.

Field Summary

Modifier and TypeField and Description
public static final Logger
private final OcrPreferences

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getName()

Implements org.jabref.logic.ocr.OcrEngine.getName.

Gets the name of the OCR engine.

public OcrResult

Returns:

OcrResult.Success containing the path to the searchable PDF, or OcrResult.Failure with an error message if OCR failed.
performOcrAndEmbedText
(Path
the file to perform OCR on.
pdfPath
)

Implements org.jabref.logic.ocr.OcrEngine.performOcrAndEmbedText.

OCRmyPDF writes the searchable PDF to a new file alongside the original file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
public static final Logger LOGGER
ocrPreferencesback to summary
private final OcrPreferences ocrPreferences

Constructor Detail

OcrMyPdfEngineback to summary
public OcrMyPdfEngine(OcrPreferences ocrPreferences)

Method Detail

getNameback to summary
public String getName()

Implements org.jabref.logic.ocr.OcrEngine.getName.

Doc from org.jabref.logic.ocr.OcrEngine.getName.

Gets the name of the OCR engine.

Annotations
@Override
performOcrAndEmbedTextback to summary
public OcrResult performOcrAndEmbedText(Path pdfPath)

Implements org.jabref.logic.ocr.OcrEngine.performOcrAndEmbedText.

OCRmyPDF writes the searchable PDF to a new file alongside the original file.

Example: document.pdf -> document_ocr.pdf.

Parameters
pdfPath:Path

the file to perform OCR on.

Returns:OcrResult

OcrResult.Success containing the path to the searchable PDF, or OcrResult.Failure with an error message if OCR failed.

Annotations
@Override