- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
pdftron::PDF::OCRModule Class Reference

`#include <OCRModule.h>`

## Static Public Member Functions
static bool | IsModuleAvailable ()
static bool | IsIRISModuleAvailable ()
static void | ImageToPDF (PDFDoc dst, const UString &src, OCROptions *options)
static void | ProcessPDF (PDFDoc dst, OCROptions *options)
static UString | GetOCRJsonFromImage (PDFDoc dst, const UString &src, OCROptions *options)
static UString | GetOCRJsonFromPDF (PDFDoc src, OCROptions *options)
static void | ApplyOCRJsonToPDF (PDFDoc dst, const UString &json)
static UString | GetOCRXmlFromImage (PDFDoc dst, const UString &src, OCROptions *options)
static UString | GetOCRXmlFromPDF (PDFDoc src, OCROptions *options)
static void | ApplyOCRXmlToPDF (PDFDoc dst, const UString &xml)

## Detailed Description

The class OCRModule. static interface to PDFTron SDKs OCR functionality

Definition at line 24 of file OCRModule.h.

## Member Function Documentation

static void pdftron::PDF::OCRModule::ApplyOCRJsonToPDF | ( | PDFDoc | dst,
|  | const UString & | json
| ) |  |
| static

Add hidden text layer to a PDF consisting of raster image(s).

Parameters

  dst | – The source and destination document.
  json | – JSON representing OCR results.

static void pdftron::PDF::OCRModule::ApplyOCRXmlToPDF | ( | PDFDoc | dst,
|  | const UString & | xml
| ) |  |
| static

Add hidden text layer to a PDF consisting of raster image(s).

Parameters

  dst | – The source and destination document.
  xml | – XML representing OCR results.

static UString pdftron::PDF::OCRModule::GetOCRJsonFromImage | ( | PDFDoc | dst,
|  | const UString & | src,
|  | OCROptions * | options
| ) |  |
| static

Perform OCR on an image and return resulting JSON string. Side effect: source image is converted to PDF and stored in the destination document. The box is a summary for a text fragment bounding box (leftmost x, bottommost y, width, height) The box coordinates are in units of points (1/72 of an inch), with the origin at the top left, and larger x and y coordinates representing further right and down, respectively

Parameters

  dst | – The destination document.
  src | – The path to the input image.
  options | – OCR options (optional).

Returns
  JSON string representing OCR results.

static UString pdftron::PDF::OCRModule::GetOCRJsonFromPDF | ( | PDFDoc | src,
|  | OCROptions * | options
| ) |  |
| static

Perform OCR on a PDF and return resulting JSON string. The box is a summary for a text fragment bounding box (leftmost x, bottommost y, width, height) The box coordinates are in units of points (1/72 of an inch), with the origin at the top left, and larger x and y coordinates representing further right and down, respectively

Parameters

  src | – The source document.
  options | – OCR options (optional).

Returns
  JSON string representing OCR results.

static UString pdftron::PDF::OCRModule::GetOCRXmlFromImage | ( | PDFDoc | dst,
|  | const UString & | src,
|  | OCROptions * | options
| ) |  |
| static

Perform OCR on an image and return resulting XML string. Side effect: source image is converted to PDF and stored in the destination document. The box is a summary for a text fragment bounding box (leftmost x, bottommost y, width, height) The box coordinates are in units of points (1/72 of an inch), with the origin at the top left, and larger x and y coordinates representing further right and down, respectively

Parameters

  dst | – The destination document.
  src | – The path to the input image.
  options | – OCR options (optional).

Returns
  XML string representing OCR results.

static UString pdftron::PDF::OCRModule::GetOCRXmlFromPDF | ( | PDFDoc | src,
|  | OCROptions * | options
| ) |  |
| static

Perform OCR on a PDF and return resulting XML string. The box is a summary for a text fragment bounding box (leftmost x, bottommost y, width, height) The box coordinates are in units of points (1/72 of an inch), with the origin at the top left, and larger x and y coordinates representing further right and down, respectively

Parameters

  src | – The source document.
  options | – OCR options (optional).

Returns
  XML string representing OCR results.

static void pdftron::PDF::OCRModule::ImageToPDF | ( | PDFDoc | dst,
|  | const UString & | src,
|  | OCROptions * | options
| ) |  |
| static

Convert an image to a PDF with searchable text.

Parameters

  dst | – The destination document.
  src | – The path to the input image.
  options | – OCR options (optional).

static bool pdftron::PDF::OCRModule::IsIRISModuleAvailable | ( |  | ) |
| static

Find out whether the IRIS OCR module is available.

Returns
  returns true if the IRIS ocr module has been located.

static bool pdftron::PDF::OCRModule::IsModuleAvailable | ( |  | ) |
| static

Find out whether the OCR module is available (and licensed).

Returns
  returns true if OCR operations can be performed.

static void pdftron::PDF::OCRModule::ProcessPDF | ( | PDFDoc | dst,
|  | OCROptions * | options
| ) |  |
| static

Add searchable and selectable text to a PDF.

Parameters

  dst | – The source and destination document.
  options | – OCR options (optional).

The documentation for this class was generated from the following file:

- PDF/OCRModule.h