Skip to content

Commit 59be441

Browse files
committed
added samples ConvertTaggedPdf, ConvertToXml, GetTags, ParsePdsObjects
PDFix SDK 4.1.0 update
1 parent f0aee04 commit 59be441

38 files changed

Lines changed: 1566 additions & 250 deletions

include/OcrTesseract.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void OcrTesseract_destroy() {\
130130
GetOcrTesseract = 0;\
131131
}\
132132
DLL_HANDLE* OcrTesseract_init(const char* path) {\
133-
g_OcrTesseract_handle = PdfixLoadLibrary(path); if (!g_OcrTesseract_handle) return nullptr;\
133+
if (g_OcrTesseract_handle == nullptr) g_OcrTesseract_handle = PdfixLoadLibrary(path); if (!g_OcrTesseract_handle) return nullptr;\
134134
GetOcrTesseract = (GetOcrTesseractProcType)PdfixGetProcAddress(g_OcrTesseract_handle, "GetOcrTesseract");\
135135
if (GetOcrTesseract == nullptr) { OcrTesseract_destroy(); return nullptr; } return &g_OcrTesseract_handle; }
136136

@@ -143,15 +143,15 @@ DLL_HANDLE* OcrTesseract_init(const char* path) {\
143143
#endif
144144
#elif defined __linux__
145145
#if defined __x86_64__
146-
#define OcrTesseract_MODULE_NAME "libocr_tesseract64.so"
146+
#define OcrTesseract_MODULE_NAME "./libocr_tesseract64.so"
147147
#else
148-
#define OcrTesseract_MODULE_NAME "libocr_tesseract.so"
148+
#define OcrTesseract_MODULE_NAME "./libocr_tesseract.so"
149149
#endif
150150
#elif defined __APPLE__
151151
#if defined __x86_64__
152-
#define OcrTesseract_MODULE_NAME "libocr_tesseract64.dylib"
152+
#define OcrTesseract_MODULE_NAME "./libocr_tesseract64.dylib"
153153
#else
154-
#define OcrTesseract_MODULE_NAME "libocr_tesseract.dylib"
154+
#define OcrTesseract_MODULE_NAME "./libocr_tesseract.dylib"
155155
#endif
156156
#else
157157
#error unknown platform

include/PdfToHtml.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <stdint.h>
99

1010
#define PDFTOHTML_VERSION_MAJOR 4
11-
#define PDFTOHTML_VERSION_MINOR 0
12-
#define PDFTOHTML_VERSION_PATCH 4
11+
#define PDFTOHTML_VERSION_MINOR 1
12+
#define PDFTOHTML_VERSION_PATCH 0
1313
#define _in_
1414
#define _out_
1515
#define _callback_
@@ -113,7 +113,7 @@ void PdfToHtml_destroy() {\
113113
GetPdfToHtml = 0;\
114114
}\
115115
DLL_HANDLE* PdfToHtml_init(const char* path) {\
116-
g_PdfToHtml_handle = PdfixLoadLibrary(path); if (!g_PdfToHtml_handle) return nullptr;\
116+
if (g_PdfToHtml_handle == nullptr) g_PdfToHtml_handle = PdfixLoadLibrary(path); if (!g_PdfToHtml_handle) return nullptr;\
117117
GetPdfToHtml = (GetPdfToHtmlProcType)PdfixGetProcAddress(g_PdfToHtml_handle, "GetPdfToHtml");\
118118
if (GetPdfToHtml == nullptr) { PdfToHtml_destroy(); return nullptr; } return &g_PdfToHtml_handle; }
119119

@@ -126,15 +126,15 @@ DLL_HANDLE* PdfToHtml_init(const char* path) {\
126126
#endif
127127
#elif defined __linux__
128128
#if defined __x86_64__
129-
#define PdfToHtml_MODULE_NAME "libpdf_to_html64.so"
129+
#define PdfToHtml_MODULE_NAME "./libpdf_to_html64.so"
130130
#else
131-
#define PdfToHtml_MODULE_NAME "libpdf_to_html.so"
131+
#define PdfToHtml_MODULE_NAME "./libpdf_to_html.so"
132132
#endif
133133
#elif defined __APPLE__
134134
#if defined __x86_64__
135-
#define PdfToHtml_MODULE_NAME "libpdf_to_html64.dylib"
135+
#define PdfToHtml_MODULE_NAME "./libpdf_to_html64.dylib"
136136
#else
137-
#define PdfToHtml_MODULE_NAME "libpdf_to_html.dylib"
137+
#define PdfToHtml_MODULE_NAME "./libpdf_to_html.dylib"
138138
#endif
139139
#else
140140
#error unknown platform

0 commit comments

Comments
 (0)