00001
00002
00003
00004
00005
00006
00007 #ifndef PDF_H
00008 #define PDF_H
00009
00010 #include "ImportCropping.h"
00011
00012 namespace Poppler {
00013 class Document;
00014 }
00015 class QImage;
00016 class QString;
00017
00019 enum PdfReturn {
00020 PDF_RETURN_CANCELED,
00021 PDF_RETURN_FAILED,
00022 PDF_RETURN_SUCCESS
00023 };
00024
00028 class Pdf
00029 {
00030 public:
00032 Pdf();
00033
00035 PdfReturn load (const QString &fileName,
00036 QImage &image,
00037 int resolution,
00038 ImportCropping importCropping,
00039 bool isErrorReportRegressionTest) const;
00040
00041 private:
00042
00043 PdfReturn loadWithCropping (Poppler::Document *document,
00044 QImage &image,
00045 int resolution) const;
00046 PdfReturn loadWithoutCropping (const QString &fileName,
00047 QImage &image,
00048 int resolution) const;
00049
00050 };
00051
00052 #endif // PDF_H