tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::TessPDFRenderer Class Reference

#include <renderer.h>

Inheritance diagram for tesseract::TessPDFRenderer:
Collaboration diagram for tesseract::TessPDFRenderer:

Public Member Functions

 TessPDFRenderer (const char *outputbase, const char *datadir, bool textonly=false)
 
- Public Member Functions inherited from tesseract::TessResultRenderer
virtual ~TessResultRenderer ()
 
void insert (TessResultRenderer *next)
 
TessResultRenderernext ()
 
bool BeginDocument (const char *title)
 
bool AddImage (TessBaseAPI *api)
 
bool EndDocument ()
 
const char * file_extension () const
 
const char * title () const
 
bool happy ()
 
int imagenum () const
 

Protected Member Functions

virtual bool BeginDocumentHandler ()
 
virtual bool AddImageHandler (TessBaseAPI *api)
 
virtual bool EndDocumentHandler ()
 
- Protected Member Functions inherited from tesseract::TessResultRenderer
 TessResultRenderer (const char *outputbase, const char *extension)
 
void AppendString (const char *s)
 
void AppendData (const char *s, int len)
 

Private Member Functions

void AppendPDFObjectDIY (size_t objectsize)
 
void AppendPDFObject (const char *data)
 
char * GetPDFTextObjects (TessBaseAPI *api, double width, double height)
 

Static Private Member Functions

static bool imageToPDFObj (Pix *pix, const char *filename, long int objnum, char **pdf_object, long int *pdf_object_size, const int jpg_quality)
 

Private Attributes

long int obj_
 
GenericVector< long int > offsets_
 
GenericVector< long int > pages_
 
std::string datadir_
 
bool textonly_
 

Detailed Description

Renders tesseract output into searchable PDF

Constructor & Destructor Documentation

◆ TessPDFRenderer()

tesseract::TessPDFRenderer::TessPDFRenderer ( const char *  outputbase,
const char *  datadir,
bool  textonly = false 
)

Member Function Documentation

◆ AddImageHandler()

bool tesseract::TessPDFRenderer::AddImageHandler ( TessBaseAPI api)
protectedvirtual

◆ AppendPDFObject()

void tesseract::TessPDFRenderer::AppendPDFObject ( const char *  data)
private

◆ AppendPDFObjectDIY()

void tesseract::TessPDFRenderer::AppendPDFObjectDIY ( size_t  objectsize)
private

◆ BeginDocumentHandler()

bool tesseract::TessPDFRenderer::BeginDocumentHandler ( )
protectedvirtual

Reimplemented from tesseract::TessResultRenderer.

◆ EndDocumentHandler()

bool tesseract::TessPDFRenderer::EndDocumentHandler ( )
protectedvirtual

Reimplemented from tesseract::TessResultRenderer.

◆ GetPDFTextObjects()

char * tesseract::TessPDFRenderer::GetPDFTextObjects ( TessBaseAPI api,
double  width,
double  height 
)
private

◆ imageToPDFObj()

bool tesseract::TessPDFRenderer::imageToPDFObj ( Pix *  pix,
const char *  filename,
long int  objnum,
char **  pdf_object,
long int *  pdf_object_size,
const int  jpg_quality 
)
staticprivate

Member Data Documentation

◆ datadir_

std::string tesseract::TessPDFRenderer::datadir_
private

◆ obj_

long int tesseract::TessPDFRenderer::obj_
private

◆ offsets_

GenericVector<long int> tesseract::TessPDFRenderer::offsets_
private

◆ pages_

GenericVector<long int> tesseract::TessPDFRenderer::pages_
private

◆ textonly_

bool tesseract::TessPDFRenderer::textonly_
private

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