PoDoFo  1.0.0-dev
PdfContents.h
1 
7 #ifndef PDF_CONTENTS_H
8 #define PDF_CONTENTS_H
9 
10 #include "PdfCanvas.h"
11 
12 namespace PoDoFo {
13 
14 class PdfPage;
15 
19 class PODOFO_API PdfContents final
20 {
21  friend class PdfPage;
22 
23 private:
24  PdfContents(PdfPage &parent, PdfObject &obj);
25 
26  PdfContents(PdfPage &parent);
27 
28 public:
32  void Reset();
33 
38  inline const PdfObject& GetObject() const { return *m_object; }
39 
40  inline PdfObject& GetObject() { return *m_object; }
41 
42  charbuff GetCopy() const;
43 
47  void CopyTo(charbuff& buffer) const;
48  void CopyTo(OutputStream& stream) const;
49 
52  PdfObjectStream & CreateStreamForAppending(PdfStreamAppendFlags flags = PdfStreamAppendFlags::None);
53 
54 private:
55  void copyTo(OutputStream& stream, const PdfArray& arr) const;
56  void reset();
57 
58 private:
59  PdfPage *m_parent;
60  PdfObject *m_object;
61 };
62 
63 };
64 
65 #endif // PDF_CONTENTS_H
A interface that provides a wrapper around "PDF content" - the instructions that are used to draw on ...
Definition: PdfContents.h:20
const PdfObject & GetObject() const
Get access to the raw contents object.
Definition: PdfContents.h:38
This class represents a PDF indirect Object in memory.
Definition: PdfObject.h:35
PdfPage is one page in the pdf document.
Definition: PdfPage.h:127
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16