pdfOCR 1.0.3 API
iText.Pdfocr.OcrPdfCreator Class Reference

OcrPdfCreator is the class that creates PDF documents containing input images and text that was recognized using provided IOcrEngine. More...

Public Member Functions

  OcrPdfCreator (IOcrEngine ocrEngine)
  Creates a new OcrPdfCreator instance. More...
 
  OcrPdfCreator (IOcrEngine ocrEngine, OcrPdfCreatorProperties ocrPdfCreatorProperties)
  Creates a new OcrPdfCreator instance. More...
 
OcrPdfCreatorProperties  GetOcrPdfCreatorProperties ()
  Gets properties for OcrPdfCreator. More...
 
void  SetOcrPdfCreatorProperties (OcrPdfCreatorProperties ocrPdfCreatorProperties)
  Sets properties for OcrPdfCreator. More...
 
PdfDocument  CreatePdfA (IList< FileInfo > inputImages, PdfWriter pdfWriter, PdfOutputIntent pdfOutputIntent)
  Performs OCR with set parameters using provided IOcrEngine and creates PDF using provided iText.Kernel.Pdf.PdfWriter and iText.Kernel.Pdf.PdfOutputIntent. More...
 
PdfDocument  CreatePdf (IList< FileInfo > inputImages, PdfWriter pdfWriter)
  Performs OCR with set parameters using provided IOcrEngine and creates PDF using provided iText.Kernel.Pdf.PdfWriter. More...
 
IOcrEngine  GetOcrEngine ()
  Gets used IOcrEngine. More...
 
void  SetOcrEngine (IOcrEngine reader)
  Sets IOcrEngine reader object to perform OCR. More...
 

Detailed Description

OcrPdfCreator is the class that creates PDF documents containing input images and text that was recognized using provided IOcrEngine.

OcrPdfCreator is the class that creates PDF documents containing input images and text that was recognized using provided IOcrEngine. OcrPdfCreator provides possibilities to set list of input images to be used for OCR, to set scaling mode for images, to set color of text in output PDF document, to set fixed size of the PDF document's page and to perform OCR using given images and to return iText.Kernel.Pdf.PdfDocument as result. OCR is based on the provided IOcrEngine (e.g. tesseract reader). This parameter is obligatory and it should be provided in constructor or using setter.

Constructor & Destructor Documentation

◆ OcrPdfCreator() [1/2]

iText.Pdfocr.OcrPdfCreator.OcrPdfCreator ( IOcrEngine  ocrEngine )
inline

Creates a new OcrPdfCreator instance.

Parameters
ocrEngine

IOcrEngine selected OCR Reader

◆ OcrPdfCreator() [2/2]

iText.Pdfocr.OcrPdfCreator.OcrPdfCreator ( IOcrEngine  ocrEngine,
OcrPdfCreatorProperties  ocrPdfCreatorProperties 
)
inline

Creates a new OcrPdfCreator instance.

Parameters
ocrEngine selected OCR Reader IOcrEngine
ocrPdfCreatorProperties set of properties for OcrPdfCreator

Member Function Documentation

◆ CreatePdf()

PdfDocument iText.Pdfocr.OcrPdfCreator.CreatePdf ( IList< FileInfo >  inputImages,
PdfWriter  pdfWriter 
)
inline

Performs OCR with set parameters using provided IOcrEngine and creates PDF using provided iText.Kernel.Pdf.PdfWriter.

Parameters
inputImages

System.Collections.IList of images to be OCRed

Parameters
pdfWriter the iText.Kernel.Pdf.PdfWriter object to write final PDF document to
Returns
result iText.Kernel.Pdf.PdfDocument object

◆ CreatePdfA()

PdfDocument iText.Pdfocr.OcrPdfCreator.CreatePdfA ( IList< FileInfo >  inputImages,
PdfWriter  pdfWriter,
PdfOutputIntent  pdfOutputIntent 
)
inline

Performs OCR with set parameters using provided IOcrEngine and creates PDF using provided iText.Kernel.Pdf.PdfWriter and iText.Kernel.Pdf.PdfOutputIntent.

Performs OCR with set parameters using provided IOcrEngine and creates PDF using provided iText.Kernel.Pdf.PdfWriter and iText.Kernel.Pdf.PdfOutputIntent. PDF/A-3u document will be created if provided iText.Kernel.Pdf.PdfOutputIntent is not null.

Parameters
inputImages

System.Collections.IList of images to be OCRed

Parameters
pdfWriter the iText.Kernel.Pdf.PdfWriter object to write final PDF document to
pdfOutputIntent

iText.Kernel.Pdf.PdfOutputIntent for PDF/A-3u document

Returns
result PDF/A-3u iText.Kernel.Pdf.PdfDocument object

◆ GetOcrEngine()

IOcrEngine iText.Pdfocr.OcrPdfCreator.GetOcrEngine ( )
inline

Gets used IOcrEngine.

Gets used IOcrEngine. Returns IOcrEngine reader object to perform OCR.

Returns
selected IOcrEngine instance

◆ GetOcrPdfCreatorProperties()

OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreator.GetOcrPdfCreatorProperties ( )
inline

Gets properties for OcrPdfCreator.

Returns
set properties OcrPdfCreatorProperties

◆ SetOcrEngine()

void iText.Pdfocr.OcrPdfCreator.SetOcrEngine ( IOcrEngine  reader )
inline

Sets IOcrEngine reader object to perform OCR.

Parameters
reader selected IOcrEngine instance

◆ SetOcrPdfCreatorProperties()

void iText.Pdfocr.OcrPdfCreator.SetOcrPdfCreatorProperties ( OcrPdfCreatorProperties  ocrPdfCreatorProperties )
inline

Sets properties for OcrPdfCreator.

Parameters
ocrPdfCreatorProperties set of properties OcrPdfCreatorProperties for OcrPdfCreator