DocumentPrivilege.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/icomparable.h>
5 #include <system/array.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 class Document;
15 namespace Engine
16 {
17 namespace IO
18 {
19 namespace ConvertStrategies
20 {
21 class PdfConvertStrategy;
22 class PdfUaConvertStrategy;
23 } // namespace ConvertStrategies
24 } // namespace IO
25 } // namespace Engine
26 namespace Facades
27 {
28 class PdfFileInfo;
29 class PdfFileSecurity;
30 } // namespace Facades
31 namespace Tests
32 {
33 namespace Facades
34 {
35 class PdfFileSecurityTests;
36 } // namespace Facades
37 class RegressionTests_v23_04;
38 class RegressionTests_v7_4;
39 class RegressionTests_v8_9;
40 } // namespace Tests
41 } // namespace Pdf
42 } // namespace Aspose
43 
44 namespace Aspose {
45 
46 namespace Pdf {
47 
48 namespace Facades {
49 
60 class ASPOSE_PDF_SHARED_CLASS DocumentPrivilege final : public System::IComparable<System::SharedPtr<System::Object>>
61 {
64 
65  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
66  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
67 
68  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::PdfUaConvertStrategy;
69  friend class Aspose::Pdf::Engine::IO::ConvertStrategies::PdfConvertStrategy;
70  friend class Aspose::Pdf::Document;
73  friend class Aspose::Pdf::Tests::RegressionTests_v7_4;
74  friend class Aspose::Pdf::Tests::RegressionTests_v23_04;
75  friend class Aspose::Pdf::Tests::Facades::PdfFileSecurityTests;
76  friend class Aspose::Pdf::Tests::RegressionTests_v8_9;
77 
78 public:
79 
84  ASPOSE_PDF_SHARED_API bool get_AllowPrint();
89  ASPOSE_PDF_SHARED_API void set_AllowPrint(bool value);
94  ASPOSE_PDF_SHARED_API bool get_AllowDegradedPrinting();
99  ASPOSE_PDF_SHARED_API void set_AllowDegradedPrinting(bool value);
104  ASPOSE_PDF_SHARED_API bool get_AllowModifyContents();
109  ASPOSE_PDF_SHARED_API void set_AllowModifyContents(bool value);
114  ASPOSE_PDF_SHARED_API bool get_AllowCopy();
119  ASPOSE_PDF_SHARED_API void set_AllowCopy(bool value);
124  ASPOSE_PDF_SHARED_API bool get_AllowModifyAnnotations();
129  ASPOSE_PDF_SHARED_API void set_AllowModifyAnnotations(bool value);
134  ASPOSE_PDF_SHARED_API bool get_AllowFillIn();
139  ASPOSE_PDF_SHARED_API void set_AllowFillIn(bool value);
144  ASPOSE_PDF_SHARED_API bool get_AllowScreenReaders();
149  ASPOSE_PDF_SHARED_API void set_AllowScreenReaders(bool value);
154  ASPOSE_PDF_SHARED_API bool get_AllowAssembly();
159  ASPOSE_PDF_SHARED_API void set_AllowAssembly(bool value);
166  ASPOSE_PDF_SHARED_API void set_PrintAllowLevel(int32_t value);
175  ASPOSE_PDF_SHARED_API void set_ChangeAllowLevel(int32_t value);
182  ASPOSE_PDF_SHARED_API void set_CopyAllowLevel(int32_t value);
186  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_DegradedPrinting();
190  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_Print();
194  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_ModifyContents();
198  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_Copy();
202  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_ModifyAnnotations();
206  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_FillIn();
210  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_ScreenReaders();
214  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_Assembly();
218  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_AllowAll();
222  static ASPOSE_PDF_SHARED_API System::SharedPtr<DocumentPrivilege> get_ForbidAll();
223 
232  ASPOSE_PDF_SHARED_API int32_t CompareTo(System::SharedPtr<System::Object> obj) override;
233 
234 protected:
235 
236  int32_t get_Value();
237 
238  DocumentPrivilege(int32_t value);
239 
240  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(DocumentPrivilege, CODEPORTING_ARGS(int32_t value));
241 
242 private:
243 
244  System::ArrayPtr<int32_t> permissionBit;
245 
246 };
247 
248 } // namespace Facades
249 } // namespace Pdf
250 } // namespace Aspose
251 
252 
Class representing PDF document
Definition: Document.h:616
Represents the privileges for accessing Pdf file. Refer toPdfFileSecurity. There are 4 ways using thi...
Definition: DocumentPrivilege.h:60
Defines a method that compares two objects. Objects of this class should only be allocated using Syst...
Definition: icomparable.h:15
Definition: signed_info.h:13
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
Definition: AFRelationship.h:4
Represents a class for accessing meta information of PDF document.
Definition: PdfFileInfo.h:48
Whole PDF file will be submitted.