-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdf_dok.h
61 lines (50 loc) · 1.21 KB
/
pdf_dok.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
60
61
#ifndef PDF_DOK_H
#define PDF_DOK_H
#include <QWidget>
#include <QObject>
#include <QtWebEngineWidgets>
#include <QPrinter>
#include <QApplication>
#include <QCommandLineParser>
#include <QFile>
#include <QTextStream>
#include <functional>
using namespace std;
using namespace std::placeholders;
namespace Ui {
class pdf_dok;
}
class pdf_dok : public QWidget
{
Q_OBJECT
public:
explicit pdf_dok(QWidget *parent = nullptr);
~pdf_dok();
void handlePagePrint(const QString& html, const QString& fileName);
void printToPDF();
int run();
private slots:
void on_toolButton_clicked();
void loadFinished(bool ok);
void pdfPrintingFinished(const QString &filePath, bool success);
public slots:
void printHTML();
void printPreview(QPrinter *printer);
private:
QString m_inputPath;
QString m_outputPath;
QScopedPointer<QWebEnginePage> m_page;
void pdf2();
int cetak();
void tess();
void pdf();
void vpdf();
void qtwehtmltopdf();
QPrinter *m_printer;
QWebEngineView *m_webEnginePage;
QWidget *w;
QWebEngineView *webView;
QString html;
Ui::pdf_dok *ui;
};
#endif // PDF_DOK_H