filters

pdfdocument.h
1/*
2 * Copyright (c) 2002 Nicolas HADACEK (hadacek@kde.org)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef PDFDOCUMENT_H
21#define PDFDOCUMENT_H
22
23#include <tqfile.h>
24#include <tqdom.h>
25
26#include <KoFilter.h>
27#include <KoPageLayout.h>
28
29class Object;
30class BaseStream;
31class PDFDoc;
32
33
34namespace PDFImport
35{
36class DRect;
37class Device;
38class Data;
39
40class Document
41{
42 public:
43 Document();
44 ~Document() { clear(); }
45
46 KoFilter::ConversionStatus init(const TQString &name,
47 const TQString &ownerPassword, const TQString &userPassword);
48 void clear();
49
50 TQString info(const TQCString &key) const;
51 uint nbPages() const;
52 KoOrientation paperOrientation() const;
53 DRect paperSize(KoFormat &format) const;
54 bool isEncrypted() const;
55
56 void initDevice(Data &);
57 void treatPage(uint i);
58 void init();
59 void dumpPage(uint i);
60
61 private:
62 TQFile *_file;
63 Object *_object;
64 BaseStream *_fileStream;
65 PDFDoc *_document;
66 Device *_device;
67 uint _imageIndex;
68
69 Document(const Document &);
70 Document &operator =(const Document &);
71};
72
73} // namespace
74
75#endif