1/*
2 SPDX-FileCopyrightText: 2019 Friedrich W. H. Kossebau <kossebau@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef CODEPDFPRINTER_H
8#define CODEPDFPRINTER_H
9
10#include <KSyntaxHighlighting/Repository>
11
12#include <QTextDocument>
13
14namespace KSyntaxHighlighting
15{
16class SyntaxHighlighter;
17}
18
19class CodePdfPrinter
20{
21public:
22 explicit CodePdfPrinter();
23 ~CodePdfPrinter();
24
25public:
26 bool openSourceFile(const QString &fileName);
27 void printPdfFile(const QString &fileName);
28
29private:
30 QTextDocument m_document;
31
32 KSyntaxHighlighting::Repository m_repository;
33 KSyntaxHighlighting::SyntaxHighlighter *m_highlighter;
34};
35
36#endif
37

source code of syntax-highlighting/examples/codepdfprinter/codepdfprinter.h