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

public Class DoclingEngine

extends Object
implements OcrEngine
Class Inheritance
All Implemented Interfaces
org.jabref.logic.ocr.OcrEngine
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.ArrayList, .HashMap, .List, .Map, org.jabref.logic.ocr.OcrEngine, .OcrFailureReason, .OcrLanguage, .OcrPreferences, .OcrResult, .OcrUtils, org.jabref.logic.util.strings.StringUtil, org.jabref.model.ocr.docling.DoclingBBox, .DoclingDocument, .DoclingText, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, .PDPageContentStream, org.apache.pdfbox.pdmodel.font.PDFont, .PDType1Font, .Standard14Fonts, org.apache.pdfbox.pdmodel.graphics.state.RenderingMode, org.slf4j.Logger, .LoggerFactory, tools.jackson.databind.json.JsonMapper

Implementation of the OcrEngine interface using Docling.

Field Summary

Modifier and TypeField and Description
private static final PDFont
private static final float
private static final JsonMapper
public static final Logger
private final OcrPreferences

Constructor Summary

AccessConstructor and Description
public
DoclingEngine(OcrPreferences ocrPreferences)

Method Summary

Modifier and TypeMethod and Description
private OcrResult
embedText(Path jsonOutputPath, Path originalPdf)

private String
public String
getName()

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

Gets the name of the OCR engine.

public OcrResult
performOcrAndEmbedText(Path pdfPath)

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

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FONTback to summary
private static final PDFont FONT
FONTSIZEback to summary
private static final float FONTSIZE
JSON_MAPPERback to summary
private static final JsonMapper JSON_MAPPER
LOGGERback to summary
public static final Logger LOGGER
ocrPreferencesback to summary
private final OcrPreferences ocrPreferences

Constructor Detail

DoclingEngineback to summary
public DoclingEngine(OcrPreferences ocrPreferences)

Method Detail

embedTextback to summary
private OcrResult embedText(Path jsonOutputPath, Path originalPdf) throws IOException
filterEncodableCharactersback to summary
private String filterEncodableCharacters(String text)
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) throws IOException

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

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

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.

Annotations
@Override