API referenceGraphics

pdfSetOCREnginePath

Configure the external OCR engine executable path and its

C
BOOL32 __stdcall pdfSetOCREnginePathA(PPDF IPDF, const char* ExePath, const char* TessdataDir);
Delphi
function pdfSetOCREnginePathA(const IPDF: PPDF; const ExePath, TessdataDir: PAnsiChar): LongBool; stdcall;

Purpose. Configure the external OCR engine executable path and its tessdata language-model directory, for whatever OCR-based feature in the SDK invokes an external OCR process.

Return value / behavior. Not independently re-verified in this chapter beyond the ABI declaration (only the A entry point is exposed — there is no W sibling); consult the OCR-specific chapter, if one exists, for the consuming code path and whether the configured paths are validated at set-time or only at first OCR invocation.

See also. pdfGetTempPath (a sibling path-configuration getter, for contrast).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Graphics
Category

Setters

Exported names

pdfSetOCREnginePathA

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.