-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdf-document.h
59 lines (54 loc) · 1.43 KB
/
pdf-document.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* pdf-poppler.h
*
* Created on: Oct 31, 2017
* Author: gnat
*/
#ifndef PDF_DOCUMENT_H_
#define PDF_DOCUMENT_H_
#include <phpcpp.h>
#include <iostream>
#include <cstring>
#include <poppler-document.h>
#include <poppler-page.h>
#include <poppler-image.h>
#include <poppler-rectangle.h>
#include <poppler-global.h>
#include <poppler-page-renderer.h>
#include "pdf-image-format.h"
#include "pdf-image-result.h"
Php::Value hashDocument(Php::Parameters ¶ms);
class PdfDocument: public Php::Base {
protected:
int _major = 0;
int _minor = 0;
std::string filePath;
poppler::document *_document = NULL;
PdfImageFormat * jpeg = NULL;
PdfImageFormat * png = NULL;
PdfImageFormat * tiff = NULL;
public:
PdfDocument();
void __construct(Php::Parameters ¶ms);
Php::Value getMajorVersion();
Php::Value getMinorVersion();
Php::Value getCreator();
Php::Value getCreationDate();
Php::Value getModifiedDate();
Php::Value hasEmbeddedFiles();
Php::Value isEncrypted();
Php::Value isLinear();
Php::Value isLocked();
#if POPPLER_HAS_JS == 1
Php::Value hasJS();
Php::Value hasXFA();
#endif
Php::Value numberOfPages();
Php::Value asString();
Php::Value toImage(Php::Parameters ¶ms);
Php::Value compare(Php::Parameters ¶ms);
Php::Value hash(Php::Parameters ¶ms);
private:
PdfImageFormat * getImageFormat(int inFormat);
};
#endif /* PDF_DOCUMENT_H_ */