Skip to content

Commit 69757cd

Browse files
committed
PDFix SDK 4.0.1 update
1 parent 87556cc commit 69757cd

4 files changed

Lines changed: 22 additions & 12 deletions

File tree

include/OcrTesseract.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define OCRTESSERACT_VERSION_MAJOR 1
1111
#define OCRTESSERACT_VERSION_MINOR 0
12-
#define OCRTESSERACT_VERSION_PATCH 0
12+
#define OCRTESSERACT_VERSION_PATCH 1
1313
#define _in_
1414
#define _out_
1515
#define _callback_
@@ -79,7 +79,7 @@ typedef struct _OcrTesseractParams {
7979

8080

8181
struct OcrTesseract : PdfixPlugin {
82-
virtual bool SetLanguage(const char* lang) = 0;
82+
virtual bool SetLanguage(const wchar_t* lang) = 0;
8383
virtual bool SetData(const wchar_t* path) = 0;
8484
virtual TesseractDoc* OpenOcrDoc(PdfDoc* pdDoc) = 0;
8585
};

include/PdfToHtml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define PDFTOHTML_VERSION_MAJOR 4
1111
#define PDFTOHTML_VERSION_MINOR 0
12-
#define PDFTOHTML_VERSION_PATCH 0
12+
#define PDFTOHTML_VERSION_PATCH 1
1313
#define _in_
1414
#define _out_
1515
#define _callback_

include/Pdfix.h

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#define PDFIX_VERSION_MAJOR 4
1111
#define PDFIX_VERSION_MINOR 0
12-
#define PDFIX_VERSION_PATCH 0
12+
#define PDFIX_VERSION_PATCH 1
1313
#define MAX_INT 2147483647
1414
#define MIN_INT -2147483647
1515
#define kTemplateFlatAnnots "flat-annots"
@@ -79,6 +79,9 @@
7979
#define kTemplateCreateTextBlock "create-text-block"
8080
#define kTemplateTextWord "text-word"
8181
#define kTemplateNumColls "num-colls"
82+
#define kTemplateSplitterSizeRatio "splitter-size-ratio"
83+
#define kTemplateSplitterDeflateRatio "splitter-deflate-ratio"
84+
#define kTemplateSplitterMaxDeflate "splitter-max-deflate"
8285
#define _in_
8386
#define _out_
8487
#define _callback_
@@ -799,6 +802,12 @@ typedef enum {
799802
kDataFormatXml = 1,
800803
} PsDataFormat;
801804

805+
typedef enum {
806+
kFileStream = 0,
807+
kMemoryStream = 1,
808+
kProcStream = 2,
809+
} PdfStreamType;
810+
802811

803812
typedef struct _PdfEventParams {
804813
PdfEventType type;
@@ -1075,13 +1084,13 @@ typedef struct _PdfImageParams {
10751084
} PdfImageParams;
10761085

10771086
typedef struct _PdfAccessibleParams {
1078-
bool accept_tags;
1079-
bool embed_fonts;
1080-
bool subset_fonts;
1087+
int accept_tags;
1088+
int embed_fonts;
1089+
int subset_fonts;
10811090
_PdfAccessibleParams() {
1082-
accept_tags = false;
1083-
embed_fonts = true;
1084-
subset_fonts = true;
1091+
accept_tags = 0;
1092+
embed_fonts = 0;
1093+
subset_fonts = 0;
10851094
}
10861095
} PdfAccessibleParams;
10871096

@@ -1470,6 +1479,7 @@ struct PsStream {
14701479
virtual int GetPos() = 0;
14711480
virtual bool Flush() = 0;
14721481
virtual void* GetStream() = 0;
1482+
virtual PdfStreamType GetType() = 0;
14731483
};
14741484

14751485
struct PsFileStream : PsStream {
@@ -1488,7 +1498,7 @@ struct PsProcStream : PsStream {
14881498

14891499
struct PdfStructElement {
14901500
virtual const char* GetType() = 0;
1491-
virtual const char* GetSubType() = 0;
1501+
virtual const char* GetSubtype() = 0;
14921502
virtual int GetActualText(_out_ wchar_t* buffer, int len) = 0;
14931503
};
14941504

src/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ int main()
109109
std::cout << "OcrWithTesseract" << std::endl;
110110
OcrTesseractParams ocr_params;
111111
OcrWithTesseract(email, key, open_path, GetAbsolutePath(L"output/OcrTesseract.pdf"),
112-
GetAbsolutePath(L"resources/"), "eng", ocr_params);
112+
GetAbsolutePath(L"resources/"), L"eng", ocr_params);
113113

114114
std::cout << "PrintPage" << std::endl;
115115
PrintPage(email, key, open_path);

0 commit comments

Comments
 (0)