Click or drag to resize
OcrPdfRenderer Class
Create PDF Renderer interface for rendering tesseract results into a document
Inheritance Hierarchy

Namespace: Patagames.Ocr
Assembly: Patagames.Ocr (in Patagames.Ocr.dll) Version:
public class OcrPdfRenderer : OcrResultRenderer

The OcrPdfRenderer type exposes the following members.

Public propertyExtension
Gets renderer extension
(Inherited from OcrResultRenderer.)
Public propertyHandle
Handle to internal tesseract renderer
(Inherited from OcrResultRenderer.)
Public propertyImageCount
Gets the index of the last image given to AddImage (i.e. images are incremented whether the image succeeded or not)
(Inherited from OcrResultRenderer.)
Public propertyTitle
Gets document title
(Inherited from OcrResultRenderer.)
Public methodAddImage
Adds the recognized text from the source image to the current document. Invalid if BeginDocument not yet called.
(Inherited from OcrResultRenderer.)
Public methodBeginDocument
Starts a new document with the given title. This clears the contents of the output data.
(Inherited from OcrResultRenderer.)
Public methodStatic memberCreate
Create new instance of OcrPdfRenderer class.
Public methodDispose
Releases all resources used by this OcrResultRenderer
(Inherited from OcrResultRenderer.)
Public methodEndDocument
Finishes the document and finalizes the output data. Invalid if BeginDocument(String) not yet called.
(Inherited from OcrResultRenderer.)
Public methodInsert
Insert renderer
(Inherited from OcrResultRenderer.)
Public methodNext
Get next rendeder.
(Inherited from OcrResultRenderer.)
This interface is then used to inject the renderer class into tesseract when processing images.

For simplicity implementing this with tesesract version 3.01, the renderer contains document state that is cleared from document to document just as the TessBaseAPI is. This way the base API can just delegate its rendering functionality to injected renderers, and the renderers can manage the associated state needed for the specific formats in addition to the heuristics for producing it.

See Also