filters

pdfdocument.h

00001 /*
00002  * Copyright (c) 2002 Nicolas HADACEK (hadacek@kde.org)
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef PDFDOCUMENT_H
00021 #define PDFDOCUMENT_H
00022 
00023 #include <qfile.h>
00024 #include <qdom.h>
00025 
00026 #include <KoFilter.h>
00027 #include <KoPageLayout.h>
00028 
00029 class Object;
00030 class BaseStream;
00031 class PDFDoc;
00032 
00033 
00034 namespace PDFImport
00035 {
00036 class DRect;
00037 class Device;
00038 class Data;
00039 
00040 class Document
00041 {
00042  public:
00043     Document();
00044     ~Document() { clear(); }
00045 
00046     KoFilter::ConversionStatus init(const QString &name,
00047                     const QString &ownerPassword, const QString &userPassword);
00048     void clear();
00049 
00050     QString info(const QCString &key) const;
00051     uint nbPages() const;
00052     KoOrientation paperOrientation() const;
00053     DRect paperSize(KoFormat &format) const;
00054     bool isEncrypted() const;
00055 
00056     void initDevice(Data &);
00057     void treatPage(uint i);
00058     void init();
00059     void dumpPage(uint i);
00060 
00061  private:
00062     QFile      *_file;
00063     Object     *_object;
00064     BaseStream *_fileStream;
00065     PDFDoc     *_document;
00066     Device     *_device;
00067     uint        _imageIndex;
00068 
00069     Document(const Document &);
00070     Document &operator =(const Document &);
00071 };
00072 
00073 } // namespace
00074 
00075 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys