Property OcrEngine
OcrEngine
Gets or sets an optional OCR engine for extracting text from image-based pages.
public OcrEngine OcrEngine { get; set; }
Property Value
Examples
using var chat = new PdfChat(chatModel, embeddingModel);
// Enable OCR for scanned PDF pages
chat.OcrEngine = new OcrEngine();
Remarks
When set, enables optical character recognition on pages that contain scanned content or embedded images with text that cannot be extracted directly from the PDF structure.
Used when PageProcessingMode is set to TextExtraction, or when set to Auto and the page requires text recognition but vision-based analysis is not available or not selected.
If neither OcrEngine nor DocumentVisionParser is set, image-based pages yield no extractable text.
- See Also