Facade.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/shared_ptr.h>
5 
6 #include "Aspose.PDF.Cpp/License/IVentureLicenseTarget.h"
7 #include "Aspose.PDF.Cpp/Facades/IFacade.h"
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 class Document;
15 namespace Facades
16 {
17 class Form;
18 class FormEditor;
19 class PdfAnnotationEditor;
20 class PdfBookmarkEditor;
21 class PdfContentEditor;
22 class PdfConverter;
23 class PdfExtractor;
24 class PdfFileInfo;
25 class PdfFileMend;
26 class PdfFileSecurity;
27 class PdfFileSignature;
28 class PdfFileStamp;
29 class PdfPageEditor;
30 class PdfXmpMetadata;
31 class SaveableFacade;
32 } // namespace Facades
33 namespace LicenseManagement
34 {
35 class VentureLicense;
36 } // namespace LicenseManagement
37 } // namespace Pdf
38 } // namespace Aspose
39 namespace System
40 {
41 namespace IO
42 {
43 class Stream;
44 } // namespace IO
45 class String;
46 } // namespace System
47 
48 namespace Aspose {
49 
50 namespace Pdf {
51 
52 namespace Facades {
53 
57 class ASPOSE_PDF_SHARED_CLASS Facade : public virtual Aspose::Pdf::Facades::IFacade, public Aspose::Pdf::LicenseManagement::IVentureLicenseTarget
58 {
59  typedef Facade ThisType;
61  typedef Aspose::Pdf::LicenseManagement::IVentureLicenseTarget BaseType1;
62 
63  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
64  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
65 
69 
70 public:
71 
75  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Document> get_Document() const;
76 
81  ASPOSE_PDF_SHARED_API void BindPdf(System::String srcFile) override;
86  ASPOSE_PDF_SHARED_API void BindPdf(System::SharedPtr<System::IO::Stream> srcStream) override;
91  ASPOSE_PDF_SHARED_API void BindPdf(System::SharedPtr<Aspose::Pdf::Document> srcDoc) override;
95  ASPOSE_PDF_SHARED_API void Close() override;
99  ASPOSE_PDF_SHARED_API void Dispose() override;
100 
101 protected:
102 
106  bool get__IsObjectLicensed();
107 
111  ASPOSE_PDF_SHARED_API Facade();
116  ASPOSE_PDF_SHARED_API Facade(System::SharedPtr<Aspose::Pdf::Document> srcDoc);
117 
123  virtual ASPOSE_PDF_SHARED_API void BindPdf(System::String srcFile, System::String password);
129  virtual ASPOSE_PDF_SHARED_API void BindPdf(System::SharedPtr<System::IO::Stream> srcStream, System::String password);
133  virtual ASPOSE_PDF_SHARED_API void AssertDocument() const;
134 
135  virtual ASPOSE_PDF_SHARED_API ~Facade();
136 
137 private:
138 
141 
144  void AssignVentureLicense();
145 
146 };
147 
152 {
153  typedef SaveableFacade ThisType;
155  typedef Aspose::Pdf::Facades::ISaveableFacade BaseType1;
156 
157  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
158  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
159 
172 
173 public:
174 
179  ASPOSE_PDF_SHARED_API void Save(System::String destFile) override;
184  ASPOSE_PDF_SHARED_API void Save(System::SharedPtr<System::IO::Stream> destStream) override;
185 
186 protected:
187 
191  ASPOSE_PDF_SHARED_API SaveableFacade();
196  ASPOSE_PDF_SHARED_API SaveableFacade(System::SharedPtr<Aspose::Pdf::Document> srcDoc);
197 
198 };
199 
200 } // namespace Facades
201 } // namespace Pdf
202 } // namespace Aspose
203 
204 
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
bool get__IsObjectLicensed()
Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise...
Represents a class for adding texts and images on the pages of existing PDF document.
Definition: PdfFileMend.h:49
Class representing Acro form object.
Definition: Form.h:115
virtual ASPOSE_PDF_SHARED_API void AssertDocument() const
Asserts if the facade is initialized.
Definition: Artifact.h:67
Base facade class.
Definition: Facade.h:57
Represents a class to work with PDF file&#39;s bookmarks including create, modify, export, import and delete.
Definition: PdfBookmarkEditor.h:53
Facade interface that defines methods common for all saveable facades.
Definition: IFacade.h:68
ASPOSE_PDF_SHARED_API void Dispose() override
Disposes the facade.
Class for adding stamps (watermark or background) to PDF files.
Definition: PdfFileStamp.h:56
System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > GetVentureLicense() override
ASPOSE_PDF_SHARED_API void Close() override
Disposes Aspose.Pdf.Document bound with a facade.
Represents a class to edit the PDF file&#39;s page, including rotating page, zooming page, moving position and changing page size.
Definition: PdfPageEditor.h:66
Represents a class to convert a pdf file&#39;s each page to images, supporting BMP, JPEG, PNG and TIFF now. Supported content in pdfs: pictures, form, comment.
Definition: PdfConverter.h:94
Represents encrypting or decrypting a Pdf file with owner or user password, changing the security set...
Definition: PdfFileSecurity.h:45
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
General facade interface that defines common facades methods.
Definition: IFacade.h:33
void SetVentureLicense(System::SharedPtr< Aspose::Pdf::LicenseManagement::VentureLicense > license) override
Definition: AFRelationship.h:4
Represents a class for accessing meta information of PDF document.
Definition: PdfFileInfo.h:48
ASPOSE_PDF_SHARED_API SaveableFacade()
The constructor.
ASPOSE_PDF_SHARED_API Facade()
The constructor.
virtual ASPOSE_PDF_SHARED_API ~Facade()
Class for extracting images and text from PDF document.
Definition: PdfExtractor.h:83
Represents a class to sign a pdf file with a certificate.
Definition: PdfFileSignature.h:63
Class for manipulation with XMP metadata.
Definition: PdfXmpMetadata.h:55
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Document > get_Document() const
Gets the document facade is working on.
Represents a class to edit PDF file&#39;s content.
Definition: PdfContentEditor.h:89
Represents a class for work with PDF document annotations (comments).
Definition: PdfAnnotationEditor.h:52
ASPOSE_PDF_SHARED_API void Save(System::String destFile) override
Saves the PDF document to the specified file.
ASPOSE_PDF_SHARED_API void BindPdf(System::String inputFile) override
Bind input PDF file.
Class for editing forms (ading/deleting field etc)
Definition: FormEditor.h:73
Whole PDF file will be submitted.