Annotation.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 // C# preprocessor directive: #if ASPOSE_PDF_DRAWING
5 
6 // C# INACTIVE CODE:
7 // using ImageFormat = Aspose.Pdf.Drawing.ImageFormat;
8 
9 // C# preprocessor directive: #else
10 
11 
12 // C# preprocessor directive: #endif
13 
14 
15 #include <system/nullable.h>
16 #include <system/enum_helpers.h>
17 #include <system/date_time.h>
18 #include <drawing/color.h>
19 
20 #include "Aspose.PDF.Cpp/Generator/BaseParagraph.h"
21 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
22 
23 namespace Aspose
24 {
25 namespace Pdf
26 {
27 namespace Annotations
28 {
29 class AnnotationCollection;
30 enum class AnnotationFlags;
31 class AnnotationSelector;
32 enum class AnnotationType;
33 class AppearanceDictionary;
34 class Border;
35 class Characteristics;
36 class CircleAnnotation;
37 class ColorBarAnnotation;
38 class FixedPrint;
39 class FreeTextAnnotation;
40 class GenericAnnotation;
41 class HideAction;
42 class HighlightAnnotation;
43 class InkAnnotation;
44 namespace JavascriptExtensions
45 {
46 class FieldExtension;
47 } // namespace JavascriptExtensions
48 class LineAnnotation;
49 class LinkAnnotation;
50 class MarkupAnnotation;
51 class Measure;
52 class MovieAnnotation;
53 class PDF3DAnnotation;
54 class PDF3DArtwork;
55 class PDF3DViewArray;
57 class PolyAnnotation;
58 class PopupAnnotation;
60 class Redaction;
62 class RenditionAction;
64 class ScreenAnnotation;
65 class SquareAnnotation;
66 class StampAnnotation;
67 enum class TextAlignment;
68 class TextStyle;
70 class WidgetAnnotation;
71 class XfdfReader;
72 class XfdfWriter;
73 } // namespace Annotations
74 class ApsToPdfConverter;
75 class Color;
76 namespace Devices
77 {
78 class DocumentDevice;
79 } // namespace Devices
80 class Document;
81 namespace Engine
82 {
83 namespace CommonData
84 {
85 namespace Text
86 {
87 namespace Segmenting
88 {
89 class TextSegmenter;
90 } // namespace Segmenting
91 } // namespace Text
92 } // namespace CommonData
93 namespace Data
94 {
95 class IPdfDictionary;
96 class IPdfObject;
97 class IPdfPrimitive;
98 class ITrailerable;
99 } // namespace Data
100 namespace IO
101 {
102 namespace ConvertStrategies
103 {
104 namespace ConvertHelpers
105 {
106 class FormExportImportUtils;
107 } // namespace ConvertHelpers
108 class PdfAConvertStrategy;
109 class PdfUaConvertStrategy;
110 class PdfXConvertStrategy;
111 } // namespace ConvertStrategies
112 } // namespace IO
113 } // namespace Engine
114 namespace Facades
115 {
116 class Form;
117 class FormEditor;
118 class LogicalStructureConcatenation;
119 class LogicalStructureCopier;
120 class PdfAnnotationEditor;
121 class PdfFileEditor;
122 class PdfFileValidator;
123 } // namespace Facades
124 class FileSpecification;
125 namespace Forms
126 {
127 class ButtonField;
128 class CheckboxField;
129 class ComboBoxField;
130 class Field;
131 class Form;
132 class ListBoxField;
133 class RadioButtonField;
134 class RadioButtonOptionField;
135 class RichTextBoxField;
136 class SignatureField;
137 class TextBoxField;
138 class TextModel;
139 class XFA;
140 } // namespace Forms
141 enum class HorizontalAlignment;
142 namespace InteractiveFeatures
143 {
144 namespace Forms
145 {
146 class WidgetWrapper;
147 } // namespace Forms
148 } // namespace InteractiveFeatures
149 namespace LogicalStructure
150 {
151 class AnnotationElement;
152 } // namespace LogicalStructure
153 class Matrix;
154 class Operator;
155 class OperatorCollection;
156 class Page;
157 class PageCollection;
158 class PageGenerator;
159 namespace PageModel
160 {
161 class AnnotationElement;
162 } // namespace PageModel
163 class Rectangle;
164 class Resources;
165 namespace Tests
166 {
167 namespace Annotations
168 {
169 class AnnotationTests;
170 class PdfActionTests;
171 class PopupAnnotationTests;
172 class WidgetAnnotationTests;
173 } // namespace Annotations
174 namespace Facades
175 {
176 class DomFormTests;
177 } // namespace Facades
178 namespace InteractiveFeatures
179 {
180 namespace Annotations
181 {
182 class PopupAnnotationTests;
183 } // namespace Annotations
184 } // namespace InteractiveFeatures
185 namespace Plugins
186 {
187 class FormEditorTests;
188 class FormFlattenerTests;
189 class PdfFormTests;
190 } // namespace Plugins
191 class RegressionTests_v10_0;
192 class RegressionTests_v10_6;
193 class RegressionTests_v10_8;
194 class RegressionTests_v10_9;
195 class RegressionTests_v11_8;
196 class RegressionTests_v12_1;
197 class RegressionTests_v16_12;
198 class RegressionTests_v17_11;
199 class RegressionTests_v17_12;
200 class RegressionTests_v17_2;
201 class RegressionTests_v17_4;
202 class RegressionTests_v18_11;
203 class RegressionTests_v19_10;
204 class RegressionTests_v19_4;
205 class RegressionTests_v19_5;
206 class RegressionTests_v19_9;
207 class RegressionTests_v20_01;
208 class RegressionTests_v21_1;
209 class RegressionTests_v21_3;
210 class RegressionTests_v21_8;
211 class RegressionTests_v21_9;
212 class RegressionTests_v22_01;
213 class RegressionTests_v22_02;
214 class RegressionTests_v22_03;
215 class RegressionTests_v22_04;
216 class RegressionTests_v22_05;
217 class RegressionTests_v22_07;
218 class RegressionTests_v22_09;
219 class RegressionTests_v22_10;
220 class RegressionTests_v23_02;
221 class RegressionTests_v23_08;
222 class RegressionTests_v23_09;
223 class RegressionTests_v23_10;
224 class RegressionTests_v24_03;
225 class RegressionTests_v6_2;
226 class RegressionTests_v6_3;
227 class RegressionTests_v6_7;
228 class RegressionTests_v6_8;
229 class RegressionTests_v6_9;
230 class RegressionTests_v7_0;
231 class RegressionTests_v7_1;
232 class RegressionTests_v7_2;
233 class RegressionTests_v7_3;
234 class RegressionTests_v7_4;
235 class RegressionTests_v7_6;
236 class RegressionTests_v7_7;
237 class RegressionTests_v7_8;
238 class RegressionTests_v7_9;
239 class RegressionTests_v8_0;
240 class RegressionTests_v8_5;
241 class RegressionTests_v8_6;
242 class RegressionTests_v8_7;
243 class RegressionTests_v8_8;
244 class RegressionTests_v9_0;
245 class RegressionTests_v9_2;
246 class RegressionTests_v9_3;
247 class RegressionTests_v9_4;
248 class RegressionTests_v9_5;
249 class RegressionTests_v9_6;
250 class RegressionTests_v9_7;
251 class RegressionTests_v9_9;
252 } // namespace Tests
253 class TextBoxFieldXfa;
254 class XfaToPdfConverter;
255 class XForm;
256 } // namespace Pdf
257 } // namespace Aspose
258 namespace System
259 {
260 namespace Collections
261 {
262 namespace Generic
263 {
264 template <typename, typename> class Dictionary;
265 template <typename> class List;
266 } // namespace Generic
267 } // namespace Collections
268 namespace Drawing
269 {
270 namespace Imaging
271 {
272 class ImageFormat;
273 } // namespace Imaging
274 } // namespace Drawing
275 namespace Globalization
276 {
277 class CultureInfo;
278 } // namespace Globalization
279 namespace IO
280 {
281 class Stream;
282 } // namespace IO
283 namespace Xml
284 {
285 class XmlReader;
286 class XmlWriter;
287 } // namespace Xml
288 } // namespace System
289 
290 namespace Aspose {
291 
292 namespace Pdf {
293 
294 namespace Annotations {
295 
299 class ASPOSE_PDF_SHARED_CLASS Annotation : public Aspose::Pdf::BaseParagraph
300 {
301  typedef Annotation ThisType;
303 
304  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
305  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
306 
307  friend class Aspose::Pdf::ApsToPdfConverter;
308  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::PdfUaConvertStrategy;
318  friend class Aspose::Pdf::Annotations::Redaction;
321  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::PdfXConvertStrategy;
322  friend class Aspose::Pdf::PageModel::AnnotationElement;
324  friend class Aspose::Pdf::Facades::LogicalStructureConcatenation;
325  friend class Aspose::Pdf::Engine::CommonData::Text::Segmenting::TextSegmenter;
326  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::PdfAConvertStrategy;
328  friend class Aspose::Pdf::PageGenerator;
330  friend class Aspose::Pdf::Document;
370  friend class Aspose::Pdf::Annotations::XfdfWriter;
371  friend class Aspose::Pdf::Page;
373  friend class Aspose::Pdf::XfaToPdfConverter;
374  friend class Aspose::Pdf::TextBoxFieldXfa;
375  friend class Aspose::Pdf::ApsToPdfConverter;
377  friend class Aspose::Pdf::Forms::TextModel;
379  friend class Aspose::Pdf::Annotations::JavascriptExtensions::FieldExtension;
380  friend class Aspose::Pdf::InteractiveFeatures::Forms::WidgetWrapper;
381  friend class Aspose::Pdf::Facades::LogicalStructureCopier;
382  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::ConvertHelpers::FormExportImportUtils;
383  friend class Aspose::Pdf::Facades::PdfFileValidator;
384  friend class Aspose::Pdf::Tests::Facades::DomFormTests;
385  friend class Aspose::Pdf::Tests::InteractiveFeatures::Annotations::PopupAnnotationTests;
386  friend class Aspose::Pdf::Tests::Annotations::PdfActionTests;
387  friend class Aspose::Pdf::Tests::Annotations::PopupAnnotationTests;
388  friend class Aspose::Pdf::Tests::RegressionTests_v6_2;
389  friend class Aspose::Pdf::Tests::RegressionTests_v7_0;
390  friend class Aspose::Pdf::Tests::RegressionTests_v7_6;
391  friend class Aspose::Pdf::Tests::RegressionTests_v8_6;
392  friend class Aspose::Pdf::Tests::RegressionTests_v8_8;
393  friend class Aspose::Pdf::Tests::RegressionTests_v9_0;
394  friend class Aspose::Pdf::Tests::RegressionTests_v9_2;
395  friend class Aspose::Pdf::Tests::RegressionTests_v9_4;
396  friend class Aspose::Pdf::Tests::RegressionTests_v9_6;
397  friend class Aspose::Pdf::Tests::RegressionTests_v9_9;
398  friend class Aspose::Pdf::Tests::RegressionTests_v10_0;
399  friend class Aspose::Pdf::Tests::RegressionTests_v10_6;
400  friend class Aspose::Pdf::Tests::RegressionTests_v12_1;
401  friend class Aspose::Pdf::Tests::RegressionTests_v16_12;
402  friend class Aspose::Pdf::Tests::RegressionTests_v17_2;
403  friend class Aspose::Pdf::Tests::RegressionTests_v17_11;
404  friend class Aspose::Pdf::Tests::RegressionTests_v17_4;
405  friend class Aspose::Pdf::Tests::RegressionTests_v19_9;
406  friend class Aspose::Pdf::Tests::RegressionTests_v19_10;
407  friend class Aspose::Pdf::Tests::RegressionTests_v22_09;
408  friend class Aspose::Pdf::Tests::RegressionTests_v23_02;
409  friend class Aspose::Pdf::Tests::Annotations::WidgetAnnotationTests;
410  friend class Aspose::Pdf::Tests::Annotations::AnnotationTests;
411  friend class Aspose::Pdf::Tests::RegressionTests_v6_3;
412  friend class Aspose::Pdf::Tests::RegressionTests_v6_7;
413  friend class Aspose::Pdf::Tests::RegressionTests_v6_8;
414  friend class Aspose::Pdf::Tests::RegressionTests_v6_9;
415  friend class Aspose::Pdf::Tests::RegressionTests_v7_1;
416  friend class Aspose::Pdf::Tests::RegressionTests_v7_2;
417  friend class Aspose::Pdf::Tests::RegressionTests_v7_3;
418  friend class Aspose::Pdf::Tests::RegressionTests_v7_4;
419  friend class Aspose::Pdf::Tests::RegressionTests_v7_7;
420  friend class Aspose::Pdf::Tests::RegressionTests_v7_8;
421  friend class Aspose::Pdf::Tests::RegressionTests_v7_9;
422  friend class Aspose::Pdf::Tests::RegressionTests_v8_0;
423  friend class Aspose::Pdf::Tests::RegressionTests_v8_5;
424  friend class Aspose::Pdf::Tests::RegressionTests_v8_7;
425  friend class Aspose::Pdf::Tests::RegressionTests_v9_3;
426  friend class Aspose::Pdf::Tests::RegressionTests_v9_5;
427  friend class Aspose::Pdf::Tests::RegressionTests_v9_7;
428  friend class Aspose::Pdf::Tests::RegressionTests_v10_8;
429  friend class Aspose::Pdf::Tests::RegressionTests_v10_9;
430  friend class Aspose::Pdf::Tests::RegressionTests_v11_8;
431  friend class Aspose::Pdf::Tests::RegressionTests_v17_12;
432  friend class Aspose::Pdf::Tests::RegressionTests_v18_11;
433  friend class Aspose::Pdf::Tests::RegressionTests_v19_4;
434  friend class Aspose::Pdf::Tests::RegressionTests_v19_5;
435  friend class Aspose::Pdf::Tests::RegressionTests_v20_01;
436  friend class Aspose::Pdf::Tests::RegressionTests_v21_1;
437  friend class Aspose::Pdf::Tests::RegressionTests_v21_3;
438  friend class Aspose::Pdf::Tests::RegressionTests_v21_8;
439  friend class Aspose::Pdf::Tests::RegressionTests_v21_9;
440  friend class Aspose::Pdf::Tests::RegressionTests_v22_01;
441  friend class Aspose::Pdf::Tests::RegressionTests_v22_02;
442  friend class Aspose::Pdf::Tests::RegressionTests_v22_03;
443  friend class Aspose::Pdf::Tests::RegressionTests_v22_04;
444  friend class Aspose::Pdf::Tests::RegressionTests_v22_05;
445  friend class Aspose::Pdf::Tests::RegressionTests_v22_07;
446  friend class Aspose::Pdf::Tests::RegressionTests_v22_10;
447  friend class Aspose::Pdf::Tests::RegressionTests_v23_08;
448  friend class Aspose::Pdf::Tests::RegressionTests_v23_09;
449  friend class Aspose::Pdf::Tests::RegressionTests_v23_10;
450  friend class Aspose::Pdf::Tests::RegressionTests_v24_03;
451  friend class Aspose::Pdf::Tests::Plugins::PdfFormTests;
452  friend class Aspose::Pdf::Tests::Plugins::FormEditorTests;
453  friend class Aspose::Pdf::Tests::Plugins::FormFlattenerTests;
454 
455 protected:
456 
461  {
462  typedef AppearanceParameters ThisType;
463  typedef System::Object BaseType;
464 
465  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
466  RTTI_INFO_DECL();
467 
468  public:
469 
477  bool isChecked;
482 
487  AppearanceParameters(System::String appearanceType);
492  AppearanceParameters(bool isChecked);
498  AppearanceParameters(System::String appearanceType, bool isChecked);
499 
500  };
501 
505  class ITitledAnnotation : public virtual System::Object
506  {
507  typedef ITitledAnnotation ThisType;
508  typedef System::Object BaseType;
509 
510  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
511  RTTI_INFO_DECL();
512 
513  public:
514 
515  virtual System::String get_Title() = 0;
516  virtual void set_Title(System::String value) = 0;
517 
518  };
519 
520 
521 public:
522 
526  static ASPOSE_PDF_SHARED_API bool get_UpdateAppearanceOnConvert();
530  static ASPOSE_PDF_SHARED_API void set_UpdateAppearanceOnConvert(bool value);
534  static ASPOSE_PDF_SHARED_API bool get_UseFontSubset();
538  static ASPOSE_PDF_SHARED_API void set_UseFontSubset(bool value);
542  ASPOSE_PDF_SHARED_API AnnotationFlags get_Flags();
546  ASPOSE_PDF_SHARED_API void set_Flags(AnnotationFlags value);
550  virtual ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::AnnotationType get_AnnotationType() = 0;
554  virtual ASPOSE_PDF_SHARED_API double get_Width();
558  virtual ASPOSE_PDF_SHARED_API void set_Width(double value);
562  ASPOSE_PDF_SHARED_API System::SharedPtr<PdfActionCollection> get_Actions();
566  virtual ASPOSE_PDF_SHARED_API double get_Height();
570  virtual ASPOSE_PDF_SHARED_API void set_Height(double value);
574  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Rectangle> get_Rect();
578  virtual ASPOSE_PDF_SHARED_API void set_Rect(System::SharedPtr<Rectangle> value);
582  ASPOSE_PDF_SHARED_API System::String get_Contents();
586  ASPOSE_PDF_SHARED_API void set_Contents(System::String value);
590  ASPOSE_PDF_SHARED_API System::String get_Name();
594  ASPOSE_PDF_SHARED_API void set_Name(System::String value);
598  ASPOSE_PDF_SHARED_API System::DateTime get_Modified();
602  ASPOSE_PDF_SHARED_API void set_Modified(System::DateTime value);
606  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Color> get_Color();
610  ASPOSE_PDF_SHARED_API void set_Color(System::SharedPtr<Aspose::Pdf::Color> value);
614  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Annotations::Border> get_Border() const;
618  ASPOSE_PDF_SHARED_API void set_Border(System::SharedPtr<Aspose::Pdf::Annotations::Border> value);
622  virtual ASPOSE_PDF_SHARED_API System::String get_ActiveState();
626  virtual ASPOSE_PDF_SHARED_API void set_ActiveState(System::String value);
630  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Annotations::Characteristics> get_Characteristics();
634  ASPOSE_PDF_SHARED_API System::SharedPtr<AppearanceDictionary> get_States();
639  ASPOSE_PDF_SHARED_API TextAlignment get_Alignment();
644  ASPOSE_PDF_SHARED_API void set_Alignment(TextAlignment value);
649  ASPOSE_PDF_SHARED_API Aspose::Pdf::HorizontalAlignment get_HorizontalAlignment() override;
654  ASPOSE_PDF_SHARED_API void set_HorizontalAlignment(Aspose::Pdf::HorizontalAlignment value) override;
658  ASPOSE_PDF_SHARED_API Aspose::Pdf::HorizontalAlignment get_TextHorizontalAlignment();
662  ASPOSE_PDF_SHARED_API void set_TextHorizontalAlignment(Aspose::Pdf::HorizontalAlignment value);
667  ASPOSE_PDF_SHARED_API System::String get_FullName();
671  ASPOSE_PDF_SHARED_API System::SharedPtr<AppearanceDictionary> get_Appearance();
675  virtual ASPOSE_PDF_SHARED_API int32_t get_PageIndex();
676 
682  ASPOSE_PDF_SHARED_API System::SharedPtr<Rectangle> GetRectangle(bool considerRotation);
687  virtual ASPOSE_PDF_SHARED_API void Accept(System::SharedPtr<AnnotationSelector> visitor) = 0;
692  virtual ASPOSE_PDF_SHARED_API void Flatten();
697  virtual ASPOSE_PDF_SHARED_API void ChangeAfterResize(System::SharedPtr<Matrix> transform);
698 
699 protected:
700 
703  static const float DefaultFontSize;
707  static ASPOSE_PDF_SHARED_API System::String message1;
713 
716  int32_t get_StructParent();
717  void set_StructParent(int32_t value);
722  ASPOSE_PDF_SHARED_API System::SharedPtr<XForm> get_NormalAppearance();
723  bool get_FlatteningState() const;
724  void set_FlatteningState(bool value);
732  void set_Page(System::SharedPtr<Aspose::Pdf::Page> value);
736  ASPOSE_PDF_SHARED_API System::SharedPtr<Rectangle> get_RotatedRect();
740  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Rectangle> get_InnerRect();
744  double get_TemplateWidth() const;
748  double get_TemplateHeight() const;
749 
751 
752  virtual ASPOSE_PDF_SHARED_API void DeleteAllChildElements();
753  void Initialize(System::SharedPtr<Document> doc);
754  void assertAppearance();
758  virtual ASPOSE_PDF_SHARED_API void AfterImport();
759  virtual ASPOSE_PDF_SHARED_API System::Drawing::Color GetBackgroundColor();
775  virtual ASPOSE_PDF_SHARED_API void ClearAppearance(System::SharedPtr<OperatorCollection> appearance);
776  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<XForm> PrepareAppearance(System::String key, System::SharedPtr<Annotation> annotation);
781  virtual ASPOSE_PDF_SHARED_API bool AppearanceSupported();
785  virtual ASPOSE_PDF_SHARED_API void UpdateAppearance(System::SharedPtr<Annotation> annotation);
786  virtual ASPOSE_PDF_SHARED_API void UpdateAppearances();
790  void AssertNormalAppearance();
791  virtual ASPOSE_PDF_SHARED_API void WriteXfdf(System::SharedPtr<System::Xml::XmlWriter> writer);
796  virtual ASPOSE_PDF_SHARED_API void WriteXfdfAttributes(System::SharedPtr<System::Xml::XmlWriter> writer);
801  virtual ASPOSE_PDF_SHARED_API void WriteXfdfElements(System::SharedPtr<System::Xml::XmlWriter> writer);
802  virtual ASPOSE_PDF_SHARED_API void ReadXfdf(System::SharedPtr<System::Xml::XmlReader> reader);
807  virtual ASPOSE_PDF_SHARED_API void ReadXfdfAttributes(System::SharedPtr<System::Xml::XmlReader> reader);
812  virtual ASPOSE_PDF_SHARED_API void ReadXfdfElements(System::SharedPtr<System::Collections::Generic::Dictionary<System::String, System::String>> table);
813 
820  Annotation();
821 
822  virtual ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr<Aspose::Pdf::Engine::Data::ITrailerable> trailer, System::SharedPtr<Rectangle> rect);
828  ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr<Aspose::Pdf::Page> page, System::SharedPtr<Rectangle> rect);
829  virtual ASPOSE_PDF_SHARED_API void AttachToPage(System::SharedPtr<Aspose::Pdf::Page> page);
835  ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr<Document> doc, System::SharedPtr<Rectangle> rect);
836 
849 
854  virtual ASPOSE_PDF_SHARED_API void GeneratorUpdateRectangle(System::SharedPtr<Aspose::Pdf::Page> page, System::SharedPtr<Rectangle> rect);
866  void Initialize(System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfObject> annotEngineObj);
867  virtual ASPOSE_PDF_SHARED_API void InternalFlatten(System::SharedPtr<Resources> resources, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> operators);
868  virtual ASPOSE_PDF_SHARED_API System::String InternalFlatten2(System::SharedPtr<Resources> resources);
869  virtual ASPOSE_PDF_SHARED_API System::String InternalFlatten3(System::SharedPtr<Resources> resources);
870  static bool IsEmptyAppearance(System::SharedPtr<System::IO::Stream> s);
876  virtual ASPOSE_PDF_SHARED_API bool IsBackground();
877  System::SharedPtr<AppearanceDictionary> GetOrGenerateAppearance();
878  int32_t GetPageIndex(System::SharedPtr<Annotation> annotation);
885 
886  virtual ASPOSE_PDF_SHARED_API ~Annotation();
887 
888 private:
889 
893  static const int32_t DefaultIndex;
895  System::String _contents;
899  System::DateTime _modified;
900  AnnotationFlags _flags;
902  System::String _name;
903  double _templateWidth;
904  double _templateHeight;
905 
906  static System::Nullable<bool>& _useFontSubset();
907  static bool& _updateAppearanceOnConvert();
908 
913  int32_t _pageIndexCached;
914  int32_t _structParent;
920 
921  System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> CreateExtGStateWithOpacity(double opacity);
922  bool HasAppearanceOperators(System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfPrimitive> normalAppearance);
923  void CreateNormalAppearanceOperators();
924  void SetColor(System::SharedPtr<Aspose::Pdf::Color> value);
925  static void SetColor(System::SharedPtr<Annotation> annotation, System::SharedPtr<Aspose::Pdf::Color> value);
932  bool IsPageOrAnnotationOnPage(System::SharedPtr<Aspose::Pdf::Page> page, System::Nullable<int32_t> pageObjectId, int32_t objectId, int32_t generation);
933 
934 };
935 
940 {
941  typedef GenericAnnotation ThisType;
943 
944  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
945  RTTI_INFO_DECL();
946 
947 public:
948 
952  Aspose::Pdf::Annotations::AnnotationType get_AnnotationType() override;
953 
954  void Accept(System::SharedPtr<AnnotationSelector> visitor) override;
955 
957 
958 };
959 
963 class ASPOSE_PDF_SHARED_CLASS TextStyle : public System::Object
964 {
965  typedef TextStyle ThisType;
966  typedef System::Object BaseType;
967 
968  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
969  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
970 
972 
973 public:
974 
978  ASPOSE_PDF_SHARED_API System::String get_FontName();
982  ASPOSE_PDF_SHARED_API void set_FontName(System::String value);
986  ASPOSE_PDF_SHARED_API double get_FontSize();
990  ASPOSE_PDF_SHARED_API void set_FontSize(double value);
995  ASPOSE_PDF_SHARED_API TextAlignment get_Alignment();
1000  ASPOSE_PDF_SHARED_API void set_Alignment(TextAlignment value);
1008  ASPOSE_PDF_SHARED_API void set_HorizontalAlignment(Aspose::Pdf::HorizontalAlignment value);
1012  ASPOSE_PDF_SHARED_API System::Drawing::Color get_Color();
1016  ASPOSE_PDF_SHARED_API void set_Color(System::Drawing::Color value);
1017 
1022  ASPOSE_PDF_SHARED_API System::String ToString() const override;
1023 
1024 protected:
1025 
1027 
1029 
1030 private:
1031 
1032  System::WeakPtr<Annotation> _annotation;
1033  System::String _fontName;
1034  double _fontSize;
1036  System::Drawing::Color _color;
1037  bool _isFontNameSpecified;
1038  bool _isFontSizeSpecified;
1039  bool _isColorSpecified;
1040  bool _isAlignmentSpecified;
1041 
1042  void UpdateAnnotation();
1043  static Aspose::Pdf::HorizontalAlignment ConvertAlign(System::String alignment);
1044  static System::String ConvertAlign(Aspose::Pdf::HorizontalAlignment alignment);
1045  System::String ToString_NonConst();
1046 
1047 };
1048 
1049 } // namespace Annotations
1050 } // namespace Pdf
1051 } // namespace Aspose
1052 
1053 
static const System::String DefaultFontKey
Definition: Annotation.h:702
Abstract base class for poly- annotations.
Definition: PolyAnnotation.h:65
Class PDF3DViewArray.
Definition: PDF3DViewArray.h:63
Represents a freehand "scribble" composed of one or more disjoint paths.
Definition: InkAnnotation.h:69
Abstract class representing markup annotation.
Definition: MarkupAnnotation.h:82
Represents annotation characteristics
Definition: Characteristics.h:57
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Abstract class representing printer mark annotation.
Definition: PrinterMarkAnnotation.h:29
System::WeakPtr< Document > _document
Definition: Annotation.h:709
Class representing Combobox field of the form.
Definition: ComboBoxField.h:63
System::SharedPtr< System::Globalization::CultureInfo > Culture
Definition: Annotation.h:708
Represents rubber stamp annotation. This type of annotation displays text or graphics intended to loo...
Definition: StampAnnotation.h:86
Class representing line annotation.
Definition: LineAnnotation.h:74
bool isSupported
This shows that
Definition: Annotation.h:481
ASPOSE_PDF_SHARED_API void set_Alignment(TextAlignment value)
Annotation alignment. This property is obsolete. Use HorizontalAligment instead.
Class representing parameters which have influence on element appearance (checked/not checked etc) ...
Definition: Annotation.h:460
Class representing Acro form object.
Definition: Form.h:115
Represent Fixed print data of Watermark Annotation.
Definition: FixedPrint.h:36
Class representing form object.
Definition: Form.h:172
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Class representing PDF document
Definition: Document.h:616
Class representing square annotation.
Definition: SquareAnnotation.h:64
Definition: Artifact.h:67
bool _flatteningState
Definition: Annotation.h:711
Represents signature form field.
Definition: SignatureField.h:83
bool needBaseInitialization
Definition: Annotation.h:712
Represents a free text annotation that displays text directly on the page. Unlike an ordinary text an...
Definition: FreeTextAnnotation.h:91
System::String appearanceType
Appearance type : N for normal, D for "down"... applied for button
Definition: Annotation.h:473
This annotation allows to get/set Title property.
Definition: Annotation.h:505
System::SharedPtr< AppearanceDictionary > _states
Definition: Annotation.h:750
Class PDF3DArtwork.
Definition: PDF3DArtwork.h:58
Class which peroformes reading of XFDF format.
Definition: XfdfReader.h:63
ASPOSE_PDF_SHARED_API void set_Color(System::SharedPtr< Aspose::Pdf::Color > value)
Sets annotation color.
Class represnets push button field.
Definition: ButtonField.h:73
Class describes rich text editor component.
Definition: RichTextBoxField.h:64
Represents a highlight annotation that highlights a range of text in the document.
Definition: HighlightAnnotation.h:67
The class describes general annotation.
Definition: Annotation.h:939
Class representing Circle annotation.
Definition: CircleAnnotation.h:64
Class represents style of text in annotation
Definition: Annotation.h:963
Represents XML form regarding XML Forms Architecture (XFA).
Definition: XFA.h:93
Represents a base class for annotation structure elements in logical structure.
Definition: ILSElement.h:164
Class representing widget annotation.
Definition: WidgetAnnotation.h:93
HorizontalAlignment
Describes horizontal alignment.
Definition: HorizontalAlignment.h:16
Class representing embedded file.
Definition: FileSpecification.h:86
Definition: signed_info.h:13
Base class for acro form fields.
Definition: Field.h:130
Class describes RichMediaAnnotation which allows embed video/audio data into PDF document.
Definition: RichMediaAnnotation.h:59
bool _disableUpdateAppearance
Definition: Annotation.h:710
Class describes Watermark annotation object.
Definition: WatermarkAnnotation.h:73
Class represents collection of operators
Definition: OperatorCollection.h:170
Abstract class for all devices which is used to process the whole pdf document.
Definition: DocumentDevice.h:38
Class representing page resources.
Definition: Resources.h:248
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Class representing characteristics of annotation border.
Definition: Border.h:57
static const System::String DefaultFontName
Definition: Annotation.h:701
ASPOSE_PDF_SHARED_API Aspose::Pdf::HorizontalAlignment get_HorizontalAlignment() override
Gets text alignment for annotation.
AnnotationType
Enumeration of annotation types.
Definition: AnnotationType.h:18
Class represents item of RadioButton field.
Definition: RadioButtonOptionField.h:62
Class representing ColorBarAnnotation annotation. Property Color ignored, instead used ColorsOfCMYK c...
Definition: ColorBarAnnotation.h:53
Class representing text box field.
Definition: TextBoxField.h:88
ASPOSE_PDF_SHARED_API void set_HorizontalAlignment(Aspose::Pdf::HorizontalAlignment value) override
Sets text alignment for annotation.
Class representing page of PDF document.
Definition: Page.h:364
Definition: AFRelationship.h:4
A rendition action that controls the playing of multimedia content.
Definition: RenditionAction.h:42
Class which describes Measure coordinate system.
Definition: Measure.h:49
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:23
A screen annotation that specifies a region of a page upon which media clips may be played...
Definition: ScreenAnnotation.h:43
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: TextFragmentState.h:69
Class represents ListBox field.
Definition: ListBoxField.h:54
Defies a method that enables object cloning - creating a copy of an object. Objects of this class sho...
Definition: icloneable.h:15
Represents the pop-up annotation that displays text in a pop-up window for entry and editing...
Definition: PopupAnnotation.h:57
Class representing radio button field.
Definition: RadioButtonField.h:75
Represents class for color value which can be expressed in different color space. ...
Definition: Color.h:79
AnnotationFlags
A set of flags specifying various characteristics of the annotation.
Definition: AnnotationFlags.h:19
bool isChecked
True if element is checked. Applied for checkbox, radiobutton option etc.
Definition: Annotation.h:477
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:49
Class PDF3DAnnotation. This class cannot be inherited.
Definition: PDF3DAnnotation.h:85
Class representing annotation collection.
Definition: AnnotationCollection.h:56
List forward declaration.
Definition: Artifact.h:74
Class describes list of actions.
Definition: PdfActionCollection.h:43
Implements operations with PDF file: concatenation, splitting, extracting pages, making booklet...
Definition: PdfFileEditor.h:105
Represents Redact annotation.
Definition: RedactionAnnotation.h:61
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(FreeTextAnnotation, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfObject > engineAnnot, System::SharedPtr< Document > document))
Represents a hide action that hides or shows one or more annotations on the screen by setting or clea...
Definition: HideAction.h:36
virtual ASPOSECPP_SHARED_API String ToString() const
Analog of C# Object.ToString() method. Enables converting custom objects to string.
Represents a movie annotation that contains animated graphics and sound to be presented on the comput...
Definition: MovieAnnotation.h:48
Collection of PDF document pages.
Definition: PageCollection.h:134
ASPOSE_PDF_SHARED_API TextAlignment get_Alignment()
Annotation alignment. This property is obsolete. Use HorizontalAligment instead.
Class represent XForm
Definition: XForm.h:185
Collection of culture-specific values and algorithms. Setter operations are only enabled on non-read-...
Definition: culture_info.h:28
Class representing annotation object.
Definition: Annotation.h:299
static ASPOSE_PDF_SHARED_API System::String message1
The message.
Definition: Annotation.h:707
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Represents a class for work with PDF document annotations (comments).
Definition: PdfAnnotationEditor.h:52
Class representing checkbox field
Definition: CheckboxField.h:86
Class represents transformation matrix.
Definition: Matrix.h:98
static const float DefaultFontSize
Definition: Annotation.h:703
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Color > get_Color()
Gets annotation color.
Abstract class representing operator.
Definition: Operator.h:427
Class for editing forms (ading/deleting field etc)
Definition: FormEditor.h:73
TextAlignment
Alignment of text in annotation.
Definition: TextAlignment.h:14
Whole PDF file will be submitted.
Class represents rectangle.
Definition: Rectangle.h:100