From c5fedfb1ec79b97edec4a82b70f082fba93a5b5d Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Mon, 31 Dec 2018 12:56:32 +0100 Subject: image export in progress --- src/data/pdfdocument.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/data/pdfdocument.h (limited to 'src/data/pdfdocument.h') diff --git a/src/data/pdfdocument.h b/src/data/pdfdocument.h new file mode 100644 index 0000000..ebd33e9 --- /dev/null +++ b/src/data/pdfdocument.h @@ -0,0 +1,28 @@ +#ifndef PDFDOCUMENT_H +#define PDFDOCUMENT_H + +#include +#include +#include + +#include + +class PdfDocument : public QObject +{ + Q_OBJECT +public: + explicit PdfDocument(QString file, QObject *parent = nullptr); + void renderTo(QLabel *label, QRect rect); + bool isValid(); +// void exportToSvg(QString file, QSize size); + bool exportImage(QString file, const char *format, QSize outputSize=QSize()); + bool exportPdf(QString file); + void copyImageToClipboard(QSize outputSize=QSize()); + QImage asImage(QSize outputSize=QSize()); + QSize size(); +private: + Poppler::Document *_doc; + Poppler::Page *_page; +}; + +#endif // PDFDOCUMENT_H -- cgit v1.2.3