GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    OcrReader Class

    Namespace:
    GemBox.Pdf.Ocr
    Assembly:
    GemBox.Pdf.Ocr.dll

    Represents a class that performs optical character recognition.

    • C#
    • VB.NET
    public static class OcrReader
    Public Module OcrReader
    Inheritance:
    System.Object
    OcrReader

    Methods

    Read(PdfDocument)

    Performs optical character recognition on a PDF document.

    • C#
    • VB.NET
    public static PdfDocument Read(PdfDocument document)
    Public Shared Function Read(document As PdfDocument) As PdfDocument
    Parameters
    document
    PdfDocument

    The stream with an image.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Remarks

    This method creates a new PdfDocument and doesn't modify the original document.

    Read(PdfDocument, OcrReadOptions)

    Performs optical character recognition on a PDF document.

    • C#
    • VB.NET
    public static PdfDocument Read(PdfDocument document, OcrReadOptions readOptions)
    Public Shared Function Read(document As PdfDocument, readOptions As OcrReadOptions) As PdfDocument
    Parameters
    document
    PdfDocument

    The stream with an image.

    readOptions
    OcrReadOptions

    The reading options which can be used to define settings for OCR.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Remarks

    This method creates a new PdfDocument and doesn't modify the original document.

    Exceptions
    System.ArgumentNullException

    document is null.

    Read(Stream)

    Performs optical character recognition on a file in the stream, the stream can be from a PDF or an image file.

    • C#
    • VB.NET
    public static PdfDocument Read(Stream stream)
    Public Shared Function Read(stream As Stream) As PdfDocument
    Parameters
    stream
    System.IO.Stream

    The file stream from a PDF or an image.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Exceptions
    System.ArgumentNullException

    stream is null.

    Read(Stream, OcrReadOptions)

    Performs optical character recognition on a file in the stream, the stream can be from a PDF or an image file.

    • C#
    • VB.NET
    public static PdfDocument Read(Stream stream, OcrReadOptions readOptions)
    Public Shared Function Read(stream As Stream, readOptions As OcrReadOptions) As PdfDocument
    Parameters
    stream
    System.IO.Stream

    The file stream from a PDF or an image.

    readOptions
    OcrReadOptions

    The reading options which can be used to define settings for OCR.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Exceptions
    System.ArgumentNullException

    stream is null.

    Read(String)

    Performs optical character recognition on a file with the specified path, the path can point to a PDF or an image file.

    • C#
    • VB.NET
    public static PdfDocument Read(string path)
    Public Shared Function Read(path As String) As PdfDocument
    Parameters
    path
    System.String

    The file path to a PDF or an image.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Exceptions
    System.ArgumentNullException

    path is null.

    Read(String, OcrReadOptions)

    Performs optical character recognition on a file with the specified path, the path can point to a PDF or an image file.

    • C#
    • VB.NET
    public static PdfDocument Read(string path, OcrReadOptions readOptions)
    Public Shared Function Read(path As String, readOptions As OcrReadOptions) As PdfDocument
    Parameters
    path
    System.String

    The file path to a PDF or an image.

    readOptions
    OcrReadOptions

    The reading options which can be used to define settings for OCR.

    Returns
    PdfDocument

    PdfDocument with the recognized text.

    Exceptions
    System.ArgumentNullException

    path is null.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.