All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ElementReader.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2024 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFElementReader
6 #define PDFTRON_H_CPPPDFElementReader
7 
8 #include <PDF/Page.h>
9 #include <PDF/Element.h>
10 #include <PDF/OCG/Context.h>
11 #include <Common/Iterator.h>
12 #include <C/PDF/TRN_ElementReader.h>
13 
14 
15 namespace pdftron {
16  namespace PDF {
17 
18 
25 
26 
27 typedef TRN_CharData CharData;
28 
61 {
62 public:
63 
64  ElementReader();
66 
79  void Begin(const Page& page, OCG::Context* ocg_context = 0);
80 
100  void Begin(SDF::Obj content_stream, SDF::Obj resource_dict = 0, OCG::Context* ocg_context = 0);
101 
110  Element Next();
111 
119  Element Current();
120 
133  void FormBegin();
134 
157  void PatternBegin(bool fill_pattern, bool reset_ctm_tfm = false);
158 
178  void Type3FontBegin(CharData& char_data, SDF::Obj resource_dict = 0);
179 
191  bool End();
192 
201 
207  bool IsChanged(GState::GStateAttribute attrib);
208 
214  void ClearChangeList();
215 
219  void AppendResource(SDF::Obj res);
220 
231  SDF::Obj GetFont (const char* name);
232 
237  SDF::Obj GetXObject (const char* name);
238 
243  SDF::Obj GetShading(const char* name);
244 
249  SDF::Obj GetColorSpace (const char* name);
250 
255  SDF::Obj GetPattern (const char* name);
256 
261  SDF::Obj GetExtGState (const char* name);
262 
266  void Destroy();
267 
268 // @cond PRIVATE_DOC
269 #ifndef SWIGHIDDEN
270  ElementReader(TRN_ElementReader impl);
271  TRN_ElementReader mp_reader;
272 #endif
273 private:
275  ElementReader& operator= (const ElementReader&);
276 // @endcond
277 };
278 
279 
280 
281 #include <Impl/ElementReader.inl>
282 
283  }; // namespace PDF
284 }; // namespace pdftron
285 
286 #endif // PDFTRON_H_CPPPDFElementReader
SDF::Obj GetShading(const char *name)
SDF::Obj GetXObject(const char *name)
bool IsChanged(GState::GStateAttribute attrib)
Common::Iterator< int > GSChangesIterator
Definition: ElementReader.h:24
void PatternBegin(bool fill_pattern, bool reset_ctm_tfm=false)
SDF::Obj GetPattern(const char *name)
SDF::Obj GetFont(const char *name)
void AppendResource(SDF::Obj res)
SDF::Obj GetExtGState(const char *name)
void Begin(const Page &page, OCG::Context *ocg_context=0)
SDF::Obj GetColorSpace(const char *name)
void Type3FontBegin(CharData &char_data, SDF::Obj resource_dict=0)
GSChangesIterator GetChangesIterator()
TRN_CharData CharData
Definition: ElementReader.h:27