PoDoFo 1.2.0
Loading...
Searching...
No Matches
PdfContents.h
1// SPDX-FileCopyrightText: 2006 Dominik Seichter <domseichter@web.de>
2// SPDX-FileCopyrightText: 2020 Francesco Pretto <ceztko@gmail.com>
3// SPDX-License-Identifier: LGPL-2.0-or-later OR MPL-2.0
4
5#ifndef PDF_CONTENTS_H
6#define PDF_CONTENTS_H
7
8#include "PdfCanvas.h"
9
10namespace PoDoFo {
11
12class PdfPage;
13
16class PODOFO_API PdfContents final
17{
18 friend class PdfPage;
19
20private:
22
24
25public:
28 void Reset();
29
33 inline const PdfObject& GetObject() const { return *m_object; }
34
35 inline PdfObject& GetObject() { return *m_object; }
36
37 charbuff GetCopy() const;
38
40 void CopyTo(charbuff& buffer) const;
41 void CopyTo(OutputStream& stream) const;
42
44 PdfObjectStream & CreateStreamForAppending(PdfStreamAppendFlags flags = PdfStreamAppendFlags::None);
45
46private:
47 void copyTo(OutputStream& stream, const PdfArray& arr) const;
48 void reset();
49
50private:
51 PdfPage *m_parent;
52 PdfObject *m_object;
53};
54
55};
56
57#endif // PDF_CONTENTS_H
A interface that provides a wrapper around "PDF content" - the instructions that are used to draw on ...
Definition PdfContents.h:17
const PdfObject & GetObject() const
Get access to the raw contents object.
Definition PdfContents.h:33
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:31
PdfPage is one page in the pdf document.
Definition PdfPage.h:133
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:30
All classes, functions, types and enums of PoDoFo are members of these namespace.
Definition basetypes.h:13