Skip to content

Commit e079d7f

Browse files
committed
PDFix SDK update to 5.0.27, added new samples
1 parent 19de6f9 commit e079d7f

52 files changed

Lines changed: 2626 additions & 757 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

100644100755
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ bin/PDFixSDKSample*
99
bin/*.dll
1010
bin/*.dylib
1111
bin/output/
12+
13+
include/boost

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@ For complete SDK documentation see the [PDFix website](https://pdfix.net).
3434
* Digital Signature Support
3535
* eSignature Support
3636
* Time Stamp Support
37+
* PDF Forms to HTML Form conversion
3738
* Logical Content Extraction
38-
* PDF to HTML Conversion
39-
* PDF to JSON Conversion
40-
* PDF Forms to HTML Forms
41-
* Add Tags to PDF
42-
* PDF to PDF/UA
43-
* PDF to XML
39+
* PDF to HTML Conversion
40+
* PDF to JSON Conversion
41+
* PDF to XML Conversion
42+
* PDF Accessibility
43+
* Add Tags to PDF
44+
* Read and Edit document structure tree
45+
* Edit reading order
46+
* PDF to PDF/UA
4447

4548
## Installation on Windows, MacOS, Linux
4649
Copy shared libraries from the bin folder in downloaded PDFix SDK package (https://pdfix.net/download) into the build folder same as the the executable. For 64-bit environment use files with \*64.* suffix.

bin/resources/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

bin/resources/test.pdf

-191 KB
Binary file not shown.

bin/resources/test.pfx

-2.48 KB
Binary file not shown.

bin/resources/watermark.png

-5.04 KB
Binary file not shown.

include/OcrTesseract.h

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Copyright (c) 2016 PDFix. All Rights Reserved.
1+
////////////////////////////////////////////////////////////////////////////////
2+
// Copyright (c) 2019 PDFix (http://pdfix.net). All Rights Reserved.
33
// This file was generated automatically
4-
////////////////////////////////////////////////////////////////////////////////////////////////////
4+
////////////////////////////////////////////////////////////////////////////////
55
#ifndef _OcrTesseract_h
66
#define _OcrTesseract_h
77

88
#include <stdint.h>
9+
#include <vector>
910

10-
#define OCRTESSERACT_VERSION_MAJOR 1
11-
#define OCRTESSERACT_VERSION_MINOR 0
12-
#define OCRTESSERACT_VERSION_PATCH 4
1311
#define _in_
1412
#define _out_
1513
#define _callback_
1614

1715
struct OcrTesseract;
1816
struct TesseractDoc;
1917

20-
typedef int OcrTesseractFlags;
2118
typedef OcrTesseract* OcrTesseractP;
2219
typedef TesseractDoc* TesseractDocP;
2320

@@ -29,11 +26,8 @@ enum {
2926
kErrorOcrTesseractMissingPageImage = 2004,
3027
kErrorOcrTesseractProcessDoc = 2005,
3128
kErrorOcrTesseractProcessPage = 2006,
32-
} ;
33-
34-
enum {
35-
kOcrNone = 0x00,
36-
kOcrImages = 0x0001,
29+
kErrorOcrTesseractIteratePage = 2007,
30+
kErrorOcrTesseractMissingFont = 2008,
3731
} ;
3832

3933
typedef enum {
@@ -61,32 +55,17 @@ typedef enum {
6155
} OcrTesseractEngineType;
6256

6357

64-
typedef struct _OcrTesseractParams {
65-
OcrTesseractFlags flags;
66-
PdfDevRect clip_rect;
67-
OcrTesseractPageSegType page_seg;
68-
OcrTesseractEngineType engine;
69-
double zoom;
70-
PdfRotate rotate;
71-
_OcrTesseractParams() {
72-
flags = 0;
73-
zoom = 1;
74-
rotate = kRotate0;
75-
page_seg = kOcrSegAutoOSD;
76-
engine = kOcrTesseractDefault;
77-
}
78-
} OcrTesseractParams;
79-
8058

8159
struct OcrTesseract : PdfixPlugin {
8260
virtual bool SetLanguage(const wchar_t* lang) = 0;
83-
virtual bool SetData(const wchar_t* path) = 0;
61+
virtual bool SetDataPath(const wchar_t* path) = 0;
62+
virtual bool SetEngine(OcrTesseractEngineType engine) = 0;
8463
virtual TesseractDoc* OpenOcrDoc(PdfDoc* pdDoc) = 0;
8564
};
8665

8766
struct TesseractDoc {
8867
virtual bool Close() = 0;
89-
virtual bool Save(const wchar_t* path, OcrTesseractParams* params, _callback_ PdfCancelProc cancel_proc, void* cancel_data) = 0;
68+
virtual bool OcrImageToPage(PsImage* image, PdfMatrix* matrix, PdfPage* page, _callback_ PdfCancelProc cancel_proc, void* cancel_data) = 0;
9069
};
9170

9271
///////////////////////////////////////////////////////////////////////////////

include/PdfToHtml.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
////////////////////////////////////////////////////////////////////////////////////////////////////
2-
// Copyright (c) 2016 PDFix. All Rights Reserved.
1+
////////////////////////////////////////////////////////////////////////////////
2+
// Copyright (c) 2019 PDFix (http://pdfix.net). All Rights Reserved.
33
// This file was generated automatically
4-
////////////////////////////////////////////////////////////////////////////////////////////////////
4+
////////////////////////////////////////////////////////////////////////////////
55
#ifndef _PdfToHtml_h
66
#define _PdfToHtml_h
77

88
#include <stdint.h>
9+
#include <vector>
910

10-
#define PDFTOHTML_VERSION_MAJOR 4
11-
#define PDFTOHTML_VERSION_MINOR 1
12-
#define PDFTOHTML_VERSION_PATCH 0
1311
#define _in_
1412
#define _out_
1513
#define _callback_

0 commit comments

Comments
 (0)