PdfAnnotationEditor.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/array.h>
5 #include <cstdint>
6 
7 #include "Aspose.PDF.Cpp/InteractiveFeatures/Forms/Form.h"
8 #include "Aspose.PDF.Cpp/Facades/Facade.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Annotations
16 {
17 class Annotation;
18 enum class AnnotationType;
19 } // namespace Annotations
20 class Document;
21 class Rectangle;
22 } // namespace Pdf
23 } // namespace Aspose
24 namespace System
25 {
26 namespace Collections
27 {
28 namespace Generic
29 {
30 template <typename> class IList;
31 } // namespace Generic
32 } // namespace Collections
33 namespace Drawing
34 {
35 class Color;
36 } // namespace Drawing
37 namespace IO
38 {
39 class Stream;
40 } // namespace IO
41 } // namespace System
42 
43 namespace Aspose {
44 
45 namespace Pdf {
46 
47 namespace Facades {
48 
52 class ASPOSE_PDF_SHARED_CLASS PdfAnnotationEditor final : public Aspose::Pdf::Facades::SaveableFacade
53 {
56 
57  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
58  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
59 
60 public:
61 
68  ASPOSE_PDF_SHARED_API void ImportAnnotationsFromXfdf(System::String xfdfFile);
75  ASPOSE_PDF_SHARED_API void ImportAnnotationsFromFdf(System::String fdfFile);
83  ASPOSE_PDF_SHARED_API void ImportAnnotationFromXfdf(System::String xfdfFile);
91  ASPOSE_PDF_SHARED_API void ImportAnnotationFromXfdf(System::String xfdfFile, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotType);
99  ASPOSE_PDF_SHARED_API void ImportAnnotationFromXfdf(System::SharedPtr<System::IO::Stream> xfdfStream, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotType);
106  ASPOSE_PDF_SHARED_API void ImportAnnotationsFromXfdf(System::SharedPtr<System::IO::Stream> xfdfStream);
114  ASPOSE_PDF_SHARED_API void ImportAnnotationFromXfdf(System::SharedPtr<System::IO::Stream> xfdfStream);
122  ASPOSE_PDF_SHARED_API void ImportAnnotations(System::ArrayPtr<System::String> annotFile, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotType);
129  ASPOSE_PDF_SHARED_API void ImportAnnotations(System::ArrayPtr<System::String> annotFile);
137  ASPOSE_PDF_SHARED_API void ImportAnnotations(System::ArrayPtr<System::SharedPtr<System::IO::Stream>> annotFileStream, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotType);
144  ASPOSE_PDF_SHARED_API void ImportAnnotations(System::ArrayPtr<System::SharedPtr<System::IO::Stream>> annotFileStream);
154  ASPOSE_PDF_SHARED_API void ModifyAnnotationsAuthor(int32_t start, int32_t end, System::String srcAuthor, System::String desAuthor);
160  ASPOSE_PDF_SHARED_API void FlatteningAnnotations();
165  ASPOSE_PDF_SHARED_API void FlatteningAnnotations(System::SharedPtr<Forms::Form::FlattenSettings> flattenSettings);
174  ASPOSE_PDF_SHARED_API void FlatteningAnnotations(int32_t start, int32_t end, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotType);
180  ASPOSE_PDF_SHARED_API void DeleteAnnotations();
187  ASPOSE_PDF_SHARED_API void DeleteAnnotations(System::String annotType);
194  ASPOSE_PDF_SHARED_API void DeleteAnnotation(System::String annotName);
204  ASPOSE_PDF_SHARED_API void ExportAnnotationsXfdf(System::SharedPtr<System::IO::Stream> xmlOutputStream, int32_t start, int32_t end, System::ArrayPtr<System::String> annotTypes);
214  ASPOSE_PDF_SHARED_API void ExportAnnotationsXfdf(System::SharedPtr<System::IO::Stream> xmlOutputStream, int32_t start, int32_t end, System::ArrayPtr<Aspose::Pdf::Annotations::AnnotationType> annotTypes);
219  ASPOSE_PDF_SHARED_API void ExportAnnotationsToXfdf(System::SharedPtr<System::IO::Stream> xmlOutputStream);
240 
244  ASPOSE_PDF_SHARED_API PdfAnnotationEditor();
251  ASPOSE_PDF_SHARED_API PdfAnnotationEditor(System::SharedPtr<Aspose::Pdf::Document> document);
252 
262  ASPOSE_PDF_SHARED_API void ModifyAnnotations(int32_t start, int32_t end, System::SharedPtr<Aspose::Pdf::Annotations::Annotation> annotation);
269  ASPOSE_PDF_SHARED_API void RedactArea(int32_t pageIndex, System::SharedPtr<Rectangle> rect, System::Drawing::Color color);
270 
271 private:
272 
273  System::ArrayPtr<int32_t> GetAnnotCounts();
277 
278 };
279 
280 } // namespace Facades
281 } // namespace Pdf
282 } // namespace Aspose
283 
284 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Base class for all saveable facades.
Definition: Facade.h:151
Definition: Artifact.h:67
Base facade class.
Definition: Facade.h:57
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
AnnotationType
Enumeration of annotation types.
Definition: AnnotationType.h:18
General facade interface that defines common facades methods.
Definition: IFacade.h:33
Definition: AFRelationship.h:4
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:23
Represents a class for work with PDF document annotations (comments).
Definition: PdfAnnotationEditor.h:52
Whole PDF file will be submitted.