OcrReader Class
Represents a class that performs optical character recognition.
- Inheritance:
- System.ObjectOcrReader
Methods
Read(PdfDocument)
Performs optical character recognition on a PDF document.
public static PdfDocument Read(PdfDocument document)Public Shared Function Read(document As PdfDocument) As PdfDocumentParameters
document- PdfDocument
The stream with an image.
Returns
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.
public static PdfDocument Read(PdfDocument document, OcrReadOptions readOptions)Public Shared Function Read(document As PdfDocument, readOptions As OcrReadOptions) As PdfDocumentParameters
document- PdfDocument
The stream with an image.
readOptions- OcrReadOptions
The reading options which can be used to define settings for OCR.
Returns
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.
public static PdfDocument Read(Stream stream)Public Shared Function Read(stream As Stream) As PdfDocumentParameters
stream- System.IO.Stream
The file stream from a PDF or an image.
Returns
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.
public static PdfDocument Read(Stream stream, OcrReadOptions readOptions)Public Shared Function Read(stream As Stream, readOptions As OcrReadOptions) As PdfDocumentParameters
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 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.
public static PdfDocument Read(string path)Public Shared Function Read(path As String) As PdfDocumentParameters
path- System.String
The file path to a PDF or an image.
Returns
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.
public static PdfDocument Read(string path, OcrReadOptions readOptions)Public Shared Function Read(path As String, readOptions As OcrReadOptions) As PdfDocumentParameters
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 with the recognized text.
Exceptions
- System.ArgumentNullException
path is null.