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 namespace Operators
23 {
24 class ConcatenateMatrix;
25 class LineTo;
26 class MoveTo;
27 class Re;
28 } // namespace Operators
29 class Page;
30 class Rectangle;
31 class Resources;
32 class Table;
33 namespace Text
34 {
35 class AbsorbedCell;
36 class AbsorbedRow;
37 class AbsorbedTable;
38 class TextFragment;
39 class TextPostReplaceFixer;
40 class TextSearchOptions;
41 } // namespace Text
42 } // namespace Pdf
43 } // namespace Aspose
44 namespace System
45 {
46 namespace Collections
47 {
48 namespace Generic
49 {
50 template <typename> class IList;
51 template <typename> class List;
52 template <typename, typename> class SortedList;
53 template <typename> class Stack;
54 } // namespace Generic
55 } // namespace Collections
56 } // namespace System
57 
58 namespace Aspose {
59 
60 namespace Pdf {
61 
62 namespace Text {
63 
70 class ASPOSE_PDF_SHARED_CLASS TableAbsorber : public System::Object
71 {
72  typedef TableAbsorber ThisType;
73  typedef System::Object BaseType;
74 
75  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
76  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
77 
78  friend class Aspose::Pdf::Text::TextPostReplaceFixer;
80 
81 public:
82 
89  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> get_TextSearchOptions();
96  virtual ASPOSE_PDF_SHARED_API void set_TextSearchOptions(System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> value);
106  ASPOSE_PDF_SHARED_API bool get_UseFlowEngine() const;
112  ASPOSE_PDF_SHARED_API void set_UseFlowEngine(bool value);
113 
121  ASPOSE_PDF_SHARED_API TableAbsorber(System::SharedPtr<Aspose::Pdf::Text::TextSearchOptions> textSearchOptions);
128  ASPOSE_PDF_SHARED_API TableAbsorber();
129 
136  virtual ASPOSE_PDF_SHARED_API void Visit(System::SharedPtr<Page> page);
143  ASPOSE_PDF_SHARED_API void Visit(System::SharedPtr<Document> pdf);
151  ASPOSE_PDF_SHARED_API void Remove(System::SharedPtr<AbsorbedTable> table);
161  ASPOSE_PDF_SHARED_API void Replace(System::SharedPtr<Page> page, System::SharedPtr<AbsorbedTable> oldTable, System::SharedPtr<Table> newTable);
162 
163 protected:
164 
172 
173 private:
174 
175  static const int32_t MinimalOpenCellDimension;
178  bool _useFlowEngine;
183  System::SharedPtr<Rectangle> _potentialRect;
186 
187  void Init();
189  void ParsePageContent(System::SharedPtr<Page> page);
190  void ParseOperators(System::SharedPtr<BaseOperatorCollection> operators, System::SharedPtr<Resources> resources);
193  static bool IsSameRow(System::SharedPtr<AbsorbedRow> currentRow, System::SharedPtr<AbsorbedCell> currentCell, System::SharedPtr<Rectangle>& mergedCell);
210  void FillWithText(System::SharedPtr<Page> page);
211  void ClearTextFragments(System::SharedPtr<Page> page);
212  void NoOpPath();
213  void OpStroke(System::SharedPtr<Operator> op);
214  void OpFill(System::SharedPtr<Operator> op);
221  void Q(int32_t opIndex, System::SharedPtr<Operator> op);
225  void q(int32_t opIndex, System::SharedPtr<Operator> op);
228  bool RemoveTableOpsFromRectange(System::SharedPtr<Rectangle> rect, System::SharedPtr<Page> page);
229 
230 };
231 
232 } // namespace Text
233 } // namespace Pdf
234 } // namespace Aspose
235 
236 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Represents fragment of Pdf text.
Definition: TextFragment.h:180
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:71
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: SideBySidePdfComparer.h:24
Represents a text type.
Definition: AFRelationship.h:4
Stack class forward declaration.
Definition: ImagePlacementAbsorber.h:49
List forward declaration.
Definition: Artifact.h:78
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:52
Represents an absorber object of table elements. Performs search and provides access to search result...
Definition: TableAbsorber.h:70
Whole PDF file will be submitted.