FormattedFragment.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/string.h>
5 #include <drawing/rectangle_f.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/Generator/BaseParagraph.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 class HtmlFragment;
16 class MarginInfo;
17 class Matrix;
18 class Operator;
19 namespace Operators
20 {
21 class ConcatenateMatrix;
22 } // namespace Operators
23 class Page;
24 class PageGenerator;
25 class PageInfo;
26 class PdfPageInfo;
27 class Row;
28 class Table;
29 namespace Tests
30 {
31 class LatexFragmentTests;
32 } // namespace Tests
33 class TeXFragment;
34 } // namespace Pdf
35 } // namespace Aspose
36 namespace System
37 {
38 namespace Collections
39 {
40 namespace Generic
41 {
42 template <typename> class IList;
43 template <typename> class List;
44 } // namespace Generic
45 } // namespace Collections
46 namespace Xml
47 {
48 class XmlReader;
49 class XmlTextWriter;
50 } // namespace Xml
51 } // namespace System
52 
53 namespace Aspose {
54 
55 namespace Pdf {
56 
60 class ASPOSE_PDF_SHARED_CLASS FormattedFragment : public Aspose::Pdf::BaseParagraph
61 {
64 
65  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
66  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
67 
70  friend class Aspose::Pdf::PageGenerator;
71  friend class Aspose::Pdf::Row;
72  friend class Aspose::Pdf::Table;
73  friend class Aspose::Pdf::Tests::LatexFragmentTests;
74 
75 protected:
76 
85 
88  bool get_IsConverted() const;
89  void set_IsConverted(bool value);
90  double get_Height();
91 
93 
99  static void CopyResources(System::SharedPtr<Page> srcPage, System::SharedPtr<Page> destPage);
100  bool Process(double& curX, double& curY, bool isCalculatedMode, double width, double bottomY, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> operators, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> keptWithNextOperators, int32_t& keptWithNextParagraphsCount, System::SharedPtr<Page> page, System::SharedPtr<MarginInfo> margin, System::SharedPtr<Table> table, double& lastParagraphHeight, bool isNextParagraphInline, bool isHeaderFooter);
101  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Matrix> GetMatrix(double curX, double curY, System::SharedPtr<PageInfo> pageInfo);
102  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Operators::ConcatenateMatrix> GetMatrixOperator(double curX, double curY, System::SharedPtr<PageInfo> pageInfo);
103  virtual void ConvertToPages(System::SharedPtr<Page> page, double width, double firstHeight, double anyHeight, System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<PdfPageInfo>>> pageInfos, System::SharedPtr<Matrix> matrix) = 0;
104  double CalculateWidth(double maxWidth);
105  ASPOSE_PDF_SHARED_API void Serialize(System::SharedPtr<System::Xml::XmlTextWriter> writer) override;
106  ASPOSE_PDF_SHARED_API void Deserialize(System::SharedPtr<System::Xml::XmlReader> reader) override;
111  ASPOSE_PDF_SHARED_API void CopyFields(System::SharedPtr<FormattedFragment> fragment);
112 
113 private:
114 
116  bool pr_IsConverted;
117 
118  void ClearPageInfos();
119  void FixPageHeights(System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<PdfPageInfo>>> pageInfos, double maxPageHeights);
120 
121 };
122 
123 } // namespace Pdf
124 } // namespace Aspose
125 
126 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
System::Drawing::RectangleF rectangle
Rectangle value.
Definition: FormattedFragment.h:84
Represents a rectangular area of an image defined as single-precision floating point X and Y coordina...
Definition: rectangle_f.h:14
Definition: Artifact.h:67
Represents abstract formatted fragment.
Definition: FormattedFragment.h:60
Represents html fragment.
Definition: HtmlFragment.h:48
Definition: signed_info.h:13
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
means saving in XML format
Definition: AFRelationship.h:4
Defies a method that enables object cloning - creating a copy of an object. Objects of this class sho...
Definition: icloneable.h:15
Represents a row of the table.
Definition: Row.h:53
System::String text
Text value.
Definition: FormattedFragment.h:80
List forward declaration.
Definition: Artifact.h:74
The coordinates are in the page coordinate context.
Represents a table that can be added to the page.
Definition: Table.h:86
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Represents TeX fragment.
Definition: TeXFragment.h:53
Interface of indexed container of elements. Objects of this class should only be allocated using Syst...
Definition: Collection.h:42
Whole PDF file will be submitted.