LastOCRError
OCR, error handling
Description
Returns the detailed reason for the last OCR parsing, provider, rendering, or text-layer failure
Syntax
Delphi
Function TPDFlib.LastOCRError: WideString;ActiveX
Function PDFlib::LastOCRError() As StringDLL
const wchar_t* DLLastOCRError(int InstanceID);
const char* DLLastOCRErrorA(int InstanceID);Return values
Returns the message describing the most recent OCR parsing, provider, rendering or text-layer failure. Returns an empty string when no OCR error is currently recorded.
Remarks
Configured engine failures include missing trained data, malformed recognition output, timeouts and insufficient orientation confidence
GetOCRDiagnosticsJSON also reports layer actions and completion flags, including successful skips and empty accepted results
A successful OCR operation clears the previous value
Use LastErrorCode for the stable numeric category and this function for diagnostics intended for logs or users