All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ElementWriter.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2018 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFElementWriter
6 #define PDFTRON_H_CPPPDFElementWriter
7 
8 #include <PDF/Page.h>
9 #include <PDF/Element.h>
10 #include <Common/Matrix2D.h>
11 #include <C/PDF/TRN_ElementWriter.h>
12 
13 namespace pdftron {
14  namespace PDF {
15 
16 
22 {
23 public:
24 
25  ElementWriter();
27 
28 
33  enum WriteMode {
37  };
38 
62  void Begin( Page& page, WriteMode placement = e_overlay, bool page_coord_sys = true, bool compress = true);
63 
81  void Begin(SDF::SDFDoc& doc, bool compress = true);
82 
83 
100  void Begin( SDF::Obj stream_obj_to_update, bool compress = true );
101 
107  SDF::Obj End();
108 
113  void WriteElement(Element element);
114 
130  void WritePlacedElement(Element element);
131 
137  void Flush();
138 
144  void WriteBuffer(std::vector<unsigned char> data);
145 
146 #ifndef SWIG
147  void WriteBuffer(const char* data, int data_sz);
148 #endif
149 
155  void WriteString(const char* str);
156 
160  void Destroy();
161 
163 #ifndef SWIGHIDDEN
164  TRN_ElementWriter mp_writer;
165  ElementWriter(TRN_ElementWriter impl);
166 #endif
167 private:
168  // ElementWriter should not be copied
169  ElementWriter(const ElementWriter& other);
170  ElementWriter& operator= (const ElementWriter&);
172 
173 
174 
175 };
176 
177 
178 #include <Impl/ElementWriter.inl>
179 
180  }; // namespace PDF
181 }; // namespace pdftron
182 
183 #endif // PDFTRON_H_CPPPDFElementWriter
void WritePlacedElement(Element element)
void Begin(Page &page, WriteMode placement=e_overlay, bool page_coord_sys=true, bool compress=true)
void WriteElement(Element element)
void WriteString(const char *str)
void WriteBuffer(std::vector< unsigned char > data)
element appears on top of the existing graphics
Definition: ElementWriter.h:36
element is put in the background layer of the page
Definition: ElementWriter.h:35

© 2002-2014 PDFTron Systems Inc.