2022-01-03 22:59:44 +01:00
|
|
|
#ifndef PREVIEWGENERATORPDF_H
|
|
|
|
#define PREVIEWGENERATORPDF_H
|
2024-05-20 19:14:40 +02:00
|
|
|
#include <poppler-qt6.h>
|
2022-01-03 22:59:44 +01:00
|
|
|
#include "previewgenerator.h"
|
|
|
|
#include "previewresultpdf.h"
|
|
|
|
|
|
|
|
class PreviewGeneratorPdf : public PreviewGenerator
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
QHash<QString, Poppler::Document *> documentcache;
|
|
|
|
Poppler::Document *document(QString path);
|
|
|
|
|
|
|
|
public:
|
|
|
|
using PreviewGenerator::PreviewGenerator;
|
|
|
|
|
2022-05-27 09:28:21 +02:00
|
|
|
QSharedPointer<PreviewResult> generate(RenderConfig config, QString documentPath, unsigned int page);
|
2022-01-03 22:59:44 +01:00
|
|
|
|
|
|
|
~PreviewGeneratorPdf()
|
|
|
|
{
|
|
|
|
qDeleteAll(documentcache);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PREVIEWGENERATORPDF_H
|