TableAbsorber.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 //using System.Runtime.Remoting;
4 
5 #include <system/collections/keyvalue_pair.h>
6 #include <system/array.h>
7 #include <cstdint>
8 
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Font
14 {
15 class TransformationMatrix;
16 } // namespace Font
17 namespace Pdf
18 {
19 class BaseOperatorCollection;
20 class Document;
21 class Operator;
22 class Page;
23 class Rectangle;
24 class Resources;
25 class Table;
26 namespace Text
27 {
28 class AbsorbedCell;
29 class AbsorbedRow;
30 class AbsorbedTable;
31 class TextFragment;
32 class TextPostReplaceFixer;
33 class TextSearchOptions;
34 } // namespace Text
35 } // namespace Pdf
36 } // namespace Aspose
37 namespace System
38 {
39 namespace Collections
40 {
41 namespace Generic
42 {
43 template <typename> class IList;
44 template <typename> class List;
45 template <typename, typename> class SortedList;
46 template <typename> class Stack;
47 } // namespace Generic
48 } // namespace Collections
49 } // namespace System
50 
51 namespace Aspose {
52 
53 namespace Pdf {
54 
55 namespace Text {
56 
63 class ASPOSE_PDF_SHARED_CLASS TableAbsorber : public System::Object
64 {
65  typedef TableAbsorber ThisType;
66  typedef System::Object BaseType;
67 
68  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
69  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
70 
71  friend class Aspose::Pdf::Text::TextPostReplaceFixer;
73 
74 public:
75 
82  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> get_TextSearchOptions();
89  virtual ASPOSE_PDF_SHARED_API void set_TextSearchOptions(System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> value);
99  ASPOSE_PDF_SHARED_API bool get_UseFlowEngine() const;
105  ASPOSE_PDF_SHARED_API void set_UseFlowEngine(bool value);
106 
114  ASPOSE_PDF_SHARED_API TableAbsorber(System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> textSearchOptions);
121  ASPOSE_PDF_SHARED_API TableAbsorber();
122 
129  virtual ASPOSE_PDF_SHARED_API void Visit(System::SharedPtr<Page> page);
136  ASPOSE_PDF_SHARED_API void Visit(System::SharedPtr<Document> pdf);
144  ASPOSE_PDF_SHARED_API void Remove(System::SharedPtr<AbsorbedTable> table);
154  ASPOSE_PDF_SHARED_API void Replace(System::SharedPtr<Page> page, System::SharedPtr<AbsorbedTable> oldTable, System::SharedPtr<Table> newTable);
155 
156 protected:
157 
165 
166 private:
167 
168  static const int32_t MinimalOpenCellDimension;
171  bool _useFlowEngine;
176  System::SharedPtr<Rectangle> _potentialRect;
179 
180  void Init();
182  void ParsePageContent(System::SharedPtr<Page> page);
183  void ParseOperators(System::SharedPtr<BaseOperatorCollection> operators, System::SharedPtr<Resources> resources);
186  static bool IsSameRow(System::SharedPtr<AbsorbedRow> currentRow, System::SharedPtr<AbsorbedCell> currentCell, System::SharedPtr<Rectangle>& mergedCell);
203  void FillWithText(System::SharedPtr<Page> page);
204  void ClearTextFragments(System::SharedPtr<Page> page);
205  void NoOpPath();
206  void OpStroke(System::SharedPtr<Operator> op);
207  void OpFill(System::SharedPtr<Operator> op);
208  void OpRe(System::SharedPtr<Operator> op);
209  void OpPoint(System::SharedPtr<Operator> op);
210  void OpLine(System::SharedPtr<Operator> op);
214  void Q(int32_t opIndex, System::SharedPtr<Operator> op);
218  void q(int32_t opIndex, System::SharedPtr<Operator> op);
219  void cm(System::SharedPtr<Operator> op);
221  bool RemoveTableOpsFromRectange(System::SharedPtr<Rectangle> rect, System::SharedPtr<Page> page);
222 
223 };
224 
225 } // namespace Text
226 } // namespace Pdf
227 } // namespace Aspose
228 
229 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Represents fragment of Pdf text.
Definition: TextFragment.h:173
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:67
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Represents a text type.
Definition: AFRelationship.h:4
Stack class forward declaration.
Definition: ImagePlacementAbsorber.h:47
List forward declaration.
Definition: Artifact.h:74
The coordinates are in the page coordinate context.
Sorted list wrapping FlatMap structure. Objects of this class should only be allocated using System::...
Definition: TableAbsorber.h:45
Represents an absorber object of table elements. Performs search and provides access to search result...
Definition: TableAbsorber.h:63
Whole PDF file will be submitted.