FPDFText.h
1 #pragma once
2 
3 namespace Foxit
4 {
5  namespace PDF
6  {
13  public enum class TextParseOption
14  {
16  StreamOrder = 0x0001,
18  OutputHyphen = 0x0002
19  };
20 
27  public ref class CharInfo sealed
28  {
29  public:
31  CharInfo(uint32 unicode, int32 state, RectF^ bbox)
32  {
33  this->Unicode = unicode;
34  this->State = state;
35  this->BBox = bbox;
36  }
37 
39  property uint32 Unicode;
40 
51  property int32 State;
52 
54  property RectF^ BBox;
55  };
56 
63  public ref class CharRange sealed
64  {
65  public:
67  CharRange(int32 start, int32 count)
68  {
69  this->Start = start;
70  this->Count = count;
71  }
72 
74  property int32 Start;
76  property int32 Count;
77  };
78 
90  public ref class TextSelection sealed
91  {
92  public:
103  Boolean Release();
104 
118  RectF^ GetBBox();
119 
131  String^ GetChars();
132 
147  int32 CountPieces();
148 
163  RectF^ GetPieceRect(int32 pieceIndex);
164 
182  int32 GetPieceRotation(int32 pieceIndex);
183 
200  CharRange^ GetPieceCharRange(int32 pieceIndex);
201 
206  property int64 pointer;
207  };
208 
216  public ref class TextSearch sealed
217  {
218  public:
229  Boolean Release();
230 
241  Boolean FindNext();
242 
253  Boolean FindPrev();
254 
267  TextSelection^ GetSelection();
268 
273  property int64 pointer;
274  };
275 
283  public ref class TextPage sealed
284  {
285 
286  public:
297  Boolean Release();
298 
315  int32 CountChars();
316 
335  String^ GetChars(CharRange^ charRange);
336 
352  CharInfo^ GetCharInfo(int32 charIndex);
353 
373  int32 GetCharIndexAtPos(float32 x, float32 y, float32 tolerance);
374 
392  TextSelection^ SelectByRange(CharRange^ charRange);
393 
409  TextSelection^ SelectByRectangle(RectF^ rect);
410 
438  TextSearch^ StartSearch(String^ searchPattern, uint32 flags, int32 startIndex);
439 
450  int32 CountLinks();
451 
466  String^ GetLink(int32 linkIndex);
467 
484  TextSelection^ GetLinkSelection(int32 linkIndex);
485 
490  property int64 pointer;
491 
496  property int64 linkPointer;
497 
498  };
499  }
500 }
Class to represent text selection.
Definition: FPDFText.h:90
Class to represent text search process.
Definition: FPDFText.h:216
CharInfo(UInt32 unicode, Int32 state, RectF^ bbox)
Constructor to initialize a new instance of class PDF::CharInfo with specific values.
Definition: FPDFText.h:31
Class to represent character information.
Definition: FPDFText.h:27
CharRange(Int32 start, Int32 count)
Constructor to initialize a new instance of class PDF::CharRange with specific values.
Definition: FPDFText.h:67
Class to represent text page.
Definition: FPDFText.h:283
Parse the text content of PDF page with outputting the hyphen on a line feed.
TextParseOption
Enumeration for text parsing option.
Definition: FPDFText.h:13
Class to represent character range.
Definition: FPDFText.h:63
Class to represent rectangle area(float) in device or page coordinate.
Definition: FSBase.h:121
Foxit namespace.
Definition: FPDFAnnot.h:3
Parse the text content of PDF page by the stream order.

Foxit Corporation