node-pdfutils
PopplerEngine.h
1 /*
2  * PopplerEngine.h
3  * Copyright (C) 2014 tox <tox@rootkit>
4  *
5  * Distributed under terms of the MIT license.
6  */
7 
8 #ifndef POPPLERENGINE_H
9 #define POPPLERENGINE_H
10 
11 #include <node.h>
12 #include <v8.h>
13 #include "../PdfEngineFactory.h"
14 #include <glib/poppler.h>
15 
16 class PopplerEngine : public PdfEngine {
17 public:
18  static void Init();
19  PopplerEngine();
20  ~PopplerEngine();
21 
22  static PdfEngine *NewInstance() {
23  return new PopplerEngine();
24  }
25 
26  virtual char *openFromData(char *data, size_t length);
27  virtual char *openFromPath(char *src);
28  virtual void fillDocument(PdfDocument *document);
29  virtual void fillPage(int index, PdfPage *page);
30  virtual void close();
31  virtual char* renderPage(int index, PdfRenderFormat format, PdfExportPageWorker *writer);
32  virtual char* savePdf(PdfPage *pages, PdfSaveWorker *writer);
33 
34 
35 
36 private:
37  PopplerDocument *doc;
38 };
39 
40 #endif /* !POPPLERENGINE_H */
Definition: PopplerEngine.h:16
Class representation of a PDF-Document.
Definition: PdfDocument.h:50
Definition: PdfExportPageWorker.h:14
Definition: PdfSaveWorker.h:14
Class representation of a PDF-Page.
Definition: PdfPage.h:17
Base Class for interaction with a PDF-Engine such as Poppler.
Definition: PdfEngine.h:38