2021-10-27 19:23:40 +02:00
|
|
|
// Copyright (C) 2021 Jakub Melka
|
|
|
|
//
|
|
|
|
// This file is part of PDF4QT.
|
|
|
|
//
|
|
|
|
// PDF4QT is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// with the written consent of the copyright owner, any later version.
|
|
|
|
//
|
|
|
|
// PDF4QT is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
#ifndef PDFXFAENGINE_H
|
|
|
|
#define PDFXFAENGINE_H
|
|
|
|
|
|
|
|
#include "pdfglobal.h"
|
2021-11-04 20:01:30 +01:00
|
|
|
#include "pdfdocument.h"
|
2021-11-20 18:42:25 +01:00
|
|
|
#include "pdfexception.h"
|
2021-10-27 19:23:40 +02:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace pdf
|
|
|
|
{
|
|
|
|
|
2021-11-04 20:01:30 +01:00
|
|
|
class PDFForm;
|
2021-10-31 18:04:00 +01:00
|
|
|
class PDFXFAEngineImpl;
|
2021-10-27 19:23:40 +02:00
|
|
|
|
|
|
|
class PDFXFAEngine
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PDFXFAEngine();
|
2021-10-31 18:04:00 +01:00
|
|
|
~PDFXFAEngine();
|
2021-10-27 19:23:40 +02:00
|
|
|
|
2021-11-04 20:01:30 +01:00
|
|
|
void setDocument(const PDFModifiedDocument& document, PDFForm* form);
|
|
|
|
|
2021-12-12 20:10:48 +01:00
|
|
|
/// Returns list of page sizes (after paging is complete)
|
|
|
|
std::vector<QSizeF> getPageSizes() const;
|
|
|
|
|
2021-11-20 18:42:25 +01:00
|
|
|
/// Draws XFA form
|
|
|
|
/// \param pagePointToDevicePointMatrix Page point to device point matrix
|
|
|
|
/// \param page Page
|
|
|
|
/// \param errors Error list (for reporting rendering errors)
|
|
|
|
/// \param painter Painter
|
|
|
|
void draw(const QMatrix& pagePointToDevicePointMatrix,
|
|
|
|
const PDFPage* page,
|
|
|
|
QList<PDFRenderError>& errors,
|
|
|
|
QPainter* painter);
|
|
|
|
|
2021-10-27 19:23:40 +02:00
|
|
|
private:
|
2021-10-31 18:04:00 +01:00
|
|
|
std::unique_ptr<PDFXFAEngineImpl> m_impl;
|
2021-10-27 19:23:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* START GENERATED CODE */
|
|
|
|
|
2021-10-28 20:41:28 +02:00
|
|
|
namespace xfa
|
|
|
|
{
|
|
|
|
} // namespace xfa
|
|
|
|
|
|
|
|
|
2021-10-27 19:23:40 +02:00
|
|
|
/* END GENERATED CODE */
|
|
|
|
|
|
|
|
} // namespace pdf
|
|
|
|
|
|
|
|
#endif // PDFXFAENGINE_H
|