alexa
menu

Document Processing

    Show / Hide Table of Contents

    PdfOcrAgentTools Class

    Provides AI agent tools for performing OCR operations on PDF documents.

    Inheritance
    System.Object
    AgentToolBase
    AgentToolBase<PdfDocumentBase>
    PdfOcrAgentTools
    Inherited Members
    AgentToolBase<PdfDocumentBase>.InMemoryManager
    AgentToolBase<PdfDocumentBase>.Mode
    AgentToolBase<PdfDocumentBase>.OpenDocument(String, String)
    AgentToolBase<PdfDocumentBase>.SaveDocument(String, PdfDocumentBase)
    AgentToolBase<PdfDocumentBase>.SaveFile(String, Stream)
    AgentToolBase<PdfDocumentBase>.StorageManager
    AgentToolBase.GetTools()
    Namespace: Syncfusion.AI.AgentTools.PDF
    Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
    Syntax
    public class PdfOcrAgentTools : AgentToolBase<PdfDocumentBase>

    Constructors

    PdfOcrAgentTools(DocumentStorageManager)

    Initializes a new instance of the PdfOcrAgentTools class (Mode 2 � DocumentStorage).

    Declaration
    public PdfOcrAgentTools(DocumentStorageManager manager)
    Parameters
    Type Name Description
    DocumentStorageManager manager

    The document storage manager.

    PdfOcrAgentTools(PdfDocumentManager)

    Initializes a new instance of the PdfOcrAgentTools class (Mode 1 � InMemory).

    Declaration
    public PdfOcrAgentTools(PdfDocumentManager manager)
    Parameters
    Type Name Description
    PdfDocumentManager manager

    The PDF document manager.

    Methods

    PerformOcr(String, String, String, String)

    Performs Optical Character Recognition (OCR) on a PDF document, making scanned or image-based text selectable and searchable.

    Declaration
    [Tool(Name = "PerformOcr", Description = "Performs Optical Character Recognition (OCR) on a PDF document. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode).")]
    public AgentToolResult PerformOcr([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Path to the Tesseract tessdata folder (required when language is not 'eng')")] string dataPath = null, [ToolParameter(Description = "OCR language code (e.g., eng, fra, deu, tam). Default is eng")] string language = "eng", [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
    Parameters
    Type Name Description
    System.String documentIdOrFilePath

    The document ID (InMemory mode) or input file path (DocumentStorage mode).

    System.String dataPath

    Path to the Tesseract tessdata folder (required when language is not 'eng').

    System.String language

    OCR language code (e.g., eng, fra, deu, tam). Default is eng.

    System.String outputFilePath

    Output file path for saving the result (DocumentStorage mode only).

    Returns
    Type Description
    AgentToolResult

    Result containing the document ID, language used, and data path.

    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved