18 #ifndef TESSERACT_API_RENDERER_H_ 19 #define TESSERACT_API_RENDERER_H_ 62 bool BeginDocument(
const char* title);
81 const char*
title()
const {
return title_.c_str(); }
109 const char* extension);
112 virtual bool BeginDocumentHandler();
115 virtual bool AddImageHandler(
TessBaseAPI* api) = 0;
118 virtual bool EndDocumentHandler();
123 void AppendString(
const char* s);
129 void AppendData(
const char* s,
int len);
132 const char* file_extension_;
161 virtual bool BeginDocumentHandler();
163 virtual bool EndDocumentHandler();
178 virtual bool BeginDocumentHandler();
180 virtual bool EndDocumentHandler();
193 TessPDFRenderer(
const char* outputbase,
const char* datadir,
bool textonly =
false);
196 virtual bool BeginDocumentHandler();
198 virtual bool EndDocumentHandler();
209 std::string datadir_;
212 void AppendPDFObjectDIY(
size_t objectsize);
214 void AppendPDFObject(
const char *data);
216 char* GetPDFTextObjects(
TessBaseAPI* api,
double width,
double height);
218 static bool imageToPDFObj(Pix* pix,
const char* filename,
long int objnum,
219 char** pdf_object,
long int* pdf_object_size,
const int jpg_quality);
245 #ifndef DISABLED_LEGACY_ENGINE 258 #endif // ndef DISABLED_LEGACY_ENGINE 262 #endif // TESSERACT_API_RENDERER_H_
TessResultRenderer * next()
struct TessUnlvRenderer TessUnlvRenderer
struct TessPDFRenderer TessPDFRenderer
struct TessBaseAPI TessBaseAPI
struct TessTextRenderer TessTextRenderer
const char * file_extension() const
struct TessHOcrRenderer TessHOcrRenderer
void insert(LIST list, void *node)
const char * title() const
struct TessResultRenderer TessResultRenderer
struct TessBoxTextRenderer TessBoxTextRenderer