Loading...
Searching...
No Matches
ElementReader.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 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
24 typedef Common::Iterator<int> GSChangesIterator;
25
26
27 typedef TRN_CharData CharData;
28
60 class ElementReader
61{
62 public:
63
64 ElementReader();
65 ~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
200 GSChangesIterator GetChangesIterator();
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:
274 ElementReader(const ElementReader&);
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
Context.h
Element.h
Iterator.h
Page.h
pdftron::Common::Iterator
Definition Iterator.h:21
pdftron::PDF::Element
Definition Element.h:33
pdftron::PDF::ElementReader::FormBegin
void FormBegin()
pdftron::PDF::ElementReader::IsChanged
bool IsChanged(GState::GStateAttribute attrib)
pdftron::PDF::ElementReader::End
bool End()
pdftron::PDF::ElementReader::ClearChangeList
void ClearChangeList()
pdftron::PDF::ElementReader::PatternBegin
void PatternBegin(bool fill_pattern, bool reset_ctm_tfm=false)
pdftron::PDF::ElementReader::Destroy
void Destroy()
pdftron::PDF::ElementReader::~ElementReader
~ElementReader()
pdftron::PDF::ElementReader::Current
Element Current()
pdftron::PDF::ElementReader::GetXObject
SDF::Obj GetXObject(const char *name)
pdftron::PDF::ElementReader::GetPattern
SDF::Obj GetPattern(const char *name)
pdftron::PDF::ElementReader::Begin
void Begin(SDF::Obj content_stream, SDF::Obj resource_dict=0, OCG::Context *ocg_context=0)
pdftron::PDF::ElementReader::GetFont
SDF::Obj GetFont(const char *name)
pdftron::PDF::ElementReader::AppendResource
void AppendResource(SDF::Obj res)
pdftron::PDF::ElementReader::GetChangesIterator
GSChangesIterator GetChangesIterator()
pdftron::PDF::ElementReader::GetExtGState
SDF::Obj GetExtGState(const char *name)
pdftron::PDF::ElementReader::Begin
void Begin(const Page &page, OCG::Context *ocg_context=0)
pdftron::PDF::ElementReader::Next
Element Next()
pdftron::PDF::ElementReader::GetColorSpace
SDF::Obj GetColorSpace(const char *name)
pdftron::PDF::ElementReader::GetShading
SDF::Obj GetShading(const char *name)
pdftron::PDF::ElementReader::Type3FontBegin
void Type3FontBegin(CharData &char_data, SDF::Obj resource_dict=0)
pdftron::PDF::ElementReader::ElementReader
ElementReader()
pdftron::PDF::GState::GStateAttribute
GStateAttribute
Definition GState.h:36
pdftron::PDF::OCG::Context
Definition Context.h:42
pdftron::PDF::Page
Definition Page.h:32
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::PDF
Definition Action.h:15
pdftron::PDF::GSChangesIterator
Common::Iterator< int > GSChangesIterator
Definition ElementReader.h:24
pdftron::PDF::CharData
TRN_CharData CharData
Definition ElementReader.h:27
pdftron
Definition BasicTypes.h:10