All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TextRange.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2023 by Apryse Software Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPTextRange
6 #define PDFTRON_H_CPPTextRange
7 
8 #include <Common/UString.h>
9 #include <C/PDF/TRN_TextRange.h>
10 
11 namespace pdftron {
12  namespace PDF {
13 
28 class TextRange
29 {
30 public:
31 
35  TextRange();
36  ~TextRange();
40  TextRange(const TextRange& tr);
41 
45  TextRange& operator = (const TextRange& tr);
46 
50  int GetPageNumber() const;
51 
63  std::vector<QuadPoint> GetQuads() const;
64 
65 #ifndef SWIG
66  int GetQuads(const double* &quads) const;
67 #endif
68 
73  UString GetText() const;
74 
80  UString GetTextBefore(int count) const;
81 
87  UString GetTextAfter(int count) const;
88 
92  void Destroy();
93 
94 
95  //for xamarin use only
96  static TextRange* CreateInternal(ptrdiff_t impl);
97  ptrdiff_t GetHandleInternal();
98 
99 #ifndef SWIGHIDDEN
100 
101 //private:
102  TRN_TextRange mp_textrange;
103  //for xamarin use only
104  TextRange(TRN_TextRange impl) : mp_textrange(impl) {}
105 #endif
106 };
107 
108 
109 #include <Impl/TextRange.inl>
110 
111  } // namespace PDF
112 } // namespace pdftron
113 
114 #endif // PDFTRON_H_CPPTextRange
UString GetText() const
ptrdiff_t GetHandleInternal()
static TextRange * CreateInternal(ptrdiff_t impl)
TextRange & operator=(const TextRange &tr)
std::vector< QuadPoint > GetQuads() const
UString GetTextAfter(int count) const
TRN_TextRange mp_textrange
Definition: TextRange.h:102
UString GetTextBefore(int count) const
TextRange(TRN_TextRange impl)
Definition: TextRange.h:104
int GetPageNumber() const