Aspose.Tasks for C++
PdfSaveOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="PdfSaveOptions.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/shared_ptr.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/Saving/ICloneableSaveOptions.h"
12 #include "aspose.tasks.cpp/Saving/SaveOptions.h"
13 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
14 
15 namespace Aspose
16 {
17 namespace Rendering
18 {
19 namespace Pdf
20 {
21 class PdfOptionsCore;
22 enum class PdfTextCompressionCore;
23 } // namespace Pdf
24 } // namespace Rendering
25 namespace Tasks
26 {
27 class FontSettings;
28 class IWriter;
29 namespace Saving
30 {
31 class IPageSavingCallback;
32 enum class PdfCompliance;
33 class PdfDigitalSignatureDetails;
34 class PdfEncryptionDetails;
35 enum class PdfTextCompression;
36 class PdfWriter;
37 class SaveOptions;
38 } // namespace Saving
39 } // namespace Tasks
40 } // namespace Aspose
41 namespace System
42 {
43 namespace Collections
44 {
45 namespace Generic
46 {
47 template <typename> class List;
48 } // namespace Generic
49 } // namespace Collections
50 } // namespace System
51 
52 namespace Aspose {
53 
54 namespace Tasks {
55 
56 namespace Saving {
57 
58 /// <summary>
59 /// Allows to specify additional options when rendering project pages to PDF.
60 /// </summary>
61 class ASPOSE_TASKS_SHARED_CLASS PdfSaveOptions : public Aspose::Tasks::Saving::SaveOptions, public Aspose::Tasks::Saving::SaveOptions::IReduceBottomGap, public Aspose::Tasks::Saving::SaveOptions::IFontCallbacks, public Aspose::Tasks::Saving::ICloneableSaveOptions
62 {
63  typedef PdfSaveOptions ThisType;
64  typedef Aspose::Tasks::Saving::SaveOptions BaseType;
65  typedef Aspose::Tasks::Saving::SaveOptions::IReduceBottomGap BaseType1;
66  typedef Aspose::Tasks::Saving::SaveOptions::IFontCallbacks BaseType2;
67  typedef Aspose::Tasks::Saving::ICloneableSaveOptions BaseType3;
68 
69  typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2, BaseType3> ThisTypeBaseTypesInfo;
70  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
71 
72  friend class Aspose::Tasks::Saving::PdfWriter;
73 
74 public:
75 
76  /// <summary>
77  /// Gets a value indicating whether a gap between last task and the footer must be reduced.
78  /// </summary>
79  ASPOSE_TASKS_SHARED_API bool get_ReduceFooterGap() override;
80  /// <summary>
81  /// Sets a value indicating whether a gap between last task and the footer must be reduced.
82  /// </summary>
83  ASPOSE_TASKS_SHARED_API void set_ReduceFooterGap(bool value);
84  /// <summary>
85  /// Gets a desired compliance level for generated PDF document.
86  /// Default is <see cref="PdfCompliance::Pdf15"></see>.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API PdfCompliance get_Compliance() const;
89  /// <summary>
90  /// Sets a desired compliance level for generated PDF document.
91  /// Default is <see cref="PdfCompliance::Pdf15"></see>.
92  /// </summary>
93  ASPOSE_TASKS_SHARED_API void set_Compliance(PdfCompliance value);
94  /// <summary>
95  /// Gets a encryption details. If not set, then no encryption will be performed.
96  /// </summary>
97  ASPOSE_TASKS_SHARED_API System::SharedPtr<PdfEncryptionDetails> get_EncryptionDetails() const;
98  /// <summary>
99  /// Sets a encryption details. If not set, then no encryption will be performed.
100  /// </summary>
101  ASPOSE_TASKS_SHARED_API void set_EncryptionDetails(const System::SharedPtr<PdfEncryptionDetails>& value);
102  /// <summary>
103  /// Gets a compression type to be used for all content streams except images.
104  /// Default is <see cref="PdfTextCompression::Flate"></see>.
105  /// </summary>
106  ASPOSE_TASKS_SHARED_API PdfTextCompression get_TextCompression() const;
107  /// <summary>
108  /// Sets a compression type to be used for all content streams except images.
109  /// Default is <see cref="PdfTextCompression::Flate"></see>.
110  /// </summary>
111  ASPOSE_TASKS_SHARED_API void set_TextCompression(PdfTextCompression value);
112  /// <summary>
113  /// Gets a digital signature details. If not set, then no signing will be performed.
114  /// </summary>
115  ASPOSE_TASKS_SHARED_API System::SharedPtr<PdfDigitalSignatureDetails> get_DigitalSignatureDetails() const;
116  /// <summary>
117  /// Sets a digital signature details. If not set, then no signing will be performed.
118  /// </summary>
119  ASPOSE_TASKS_SHARED_API void set_DigitalSignatureDetails(const System::SharedPtr<PdfDigitalSignatureDetails>& value);
120  /// <summary>
121  /// Gets a value indicating whether to save project pages to separate files.
122  /// </summary>
123  ASPOSE_TASKS_SHARED_API bool get_SaveToSeparateFiles() const;
124  /// <summary>
125  /// Sets a value indicating whether to save project pages to separate files.
126  /// </summary>
127  ASPOSE_TASKS_SHARED_API void set_SaveToSeparateFiles(bool value);
128  /// <summary>
129  /// Gets a user-defined callback which is used to get an output stream for each rendered page.
130  /// Is applicable when <see cref="SaveToSeparateFiles"></see> option is used.
131  /// </summary>
132  ASPOSE_TASKS_SHARED_API const System::SharedPtr<IPageSavingCallback>& get_PageSavingCallback() const;
133  /// <summary>
134  /// Sets a user-defined callback which is used to get an output stream for each rendered page.
135  /// Is applicable when <see cref="SaveToSeparateFiles"></see> option is used.
136  /// </summary>
137  ASPOSE_TASKS_SHARED_API void set_PageSavingCallback(const System::SharedPtr<IPageSavingCallback>& value);
138  /// <summary>
139  /// Gets the list of pages numbers to save when saving project layout to separate files.
140  /// <remarks>All pages will be saved if this list is empty.</remarks>
141  /// </summary>
142  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<int32_t>> get_Pages();
143  /// <summary>
144  /// Sets the list of pages numbers to save when saving project layout to separate files.
145  /// <remarks>All pages will be saved if this list is empty.</remarks>
146  /// </summary>
147  ASPOSE_TASKS_SHARED_API void set_Pages(const System::SharedPtr<System::Collections::Generic::List<int32_t>>& value);
148  /// <summary>
149  /// Specifies font settings used when rendering project's view.
150  /// </summary>
151  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::FontSettings> get_FontSettings() override;
152 
153  /// <summary>
154  /// Initializes a new instance of the <see cref="PdfSaveOptions"></see> class that can be used to save a document in the <see cref="SaveFileFormat">PDF</see> format.
155  /// </summary>
156  ASPOSE_TASKS_SHARED_API PdfSaveOptions();
157 
158 protected:
159 
160  ASPOSE_TASKS_SHARED_API PdfSaveOptions(const System::SharedPtr<PdfSaveOptions>& options);
161 
162  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(PdfSaveOptions, CODEPORTING_ARGS(const System::SharedPtr<PdfSaveOptions>& options));
163  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Rendering::Pdf::PdfOptionsCore> GetOptionsCore();
164  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
165 
166  virtual ASPOSE_TASKS_SHARED_API ~PdfSaveOptions();
167 
168  #ifdef ASPOSE_GET_SHARED_MEMBERS
169  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
170  #endif
171 
172 
173 private:
174 
175  System::SharedPtr<Aspose::Rendering::Pdf::PdfOptionsCore> optionsCore;
176  PdfCompliance compliance;
177  System::SharedPtr<PdfEncryptionDetails> encryptionDetails;
178  PdfTextCompression textCompression;
179  System::SharedPtr<System::Collections::Generic::List<int32_t>> pages;
180  System::SharedPtr<PdfDigitalSignatureDetails> digitalSignatureDetails;
181  bool pr_ReduceFooterGap;
182  bool pr_SaveToSeparateFiles;
183  System::SharedPtr<IPageSavingCallback> pr_PageSavingCallback;
184  System::SharedPtr<Aspose::Tasks::FontSettings> pr_FontSettings;
185 
186  /// <summary>
187  /// Specifies font settings used when rendering project's view.
188  /// </summary>
189  ASPOSE_TASKS_SHARED_API void set_FontSettings(const System::SharedPtr<Aspose::Tasks::FontSettings>& value);
190 
191  System::SharedPtr<SaveOptions> Clone() override;
192  void CopyOutputPropertiesFrom(System::SharedPtr<SaveOptions> source) override;
193  Aspose::Rendering::Pdf::PdfTextCompressionCore ToPdfTextCompressionCore(PdfTextCompression value);
194 
195 };
196 
197 } // namespace Saving
198 } // namespace Tasks
199 } // namespace Aspose
200 
201 
Allows to specify additional options when rendering project pages to PDF.
Definition: PdfSaveOptions.h:62
void set_EncryptionDetails(const System::SharedPtr< PdfEncryptionDetails > &value)
Sets a encryption details. If not set, then no encryption will be performed.
bool get_ReduceFooterGap() override
Gets a value indicating whether a gap between last task and the footer must be reduced.
PdfTextCompression get_TextCompression() const
Gets a compression type to be used for all content streams except images. Default is PdfTextCompressi...
void set_Compliance(PdfCompliance value)
Sets a desired compliance level for generated PDF document. Default is PdfCompliance::Pdf15.
System::SharedPtr< System::Collections::Generic::List< int32_t > > get_Pages()
Gets the list of pages numbers to save when saving project layout to separate files.
PdfCompliance get_Compliance() const
Gets a desired compliance level for generated PDF document. Default is PdfCompliance::Pdf15.
void set_SaveToSeparateFiles(bool value)
Sets a value indicating whether to save project pages to separate files.
void set_TextCompression(PdfTextCompression value)
Sets a compression type to be used for all content streams except images. Default is PdfTextCompressi...
void set_Pages(const System::SharedPtr< System::Collections::Generic::List< int32_t >> &value)
Sets the list of pages numbers to save when saving project layout to separate files.
bool get_SaveToSeparateFiles() const
Gets a value indicating whether to save project pages to separate files.
PdfSaveOptions()
Initializes a new instance of the PdfSaveOptions class that can be used to save a document in the PDF...
const System::SharedPtr< IPageSavingCallback > & get_PageSavingCallback() const
Gets a user-defined callback which is used to get an output stream for each rendered page....
System::SharedPtr< PdfDigitalSignatureDetails > get_DigitalSignatureDetails() const
Gets a digital signature details. If not set, then no signing will be performed.
void set_PageSavingCallback(const System::SharedPtr< IPageSavingCallback > &value)
Sets a user-defined callback which is used to get an output stream for each rendered page....
void set_DigitalSignatureDetails(const System::SharedPtr< PdfDigitalSignatureDetails > &value)
Sets a digital signature details. If not set, then no signing will be performed.
void set_ReduceFooterGap(bool value)
Sets a value indicating whether a gap between last task and the footer must be reduced.
System::SharedPtr< Aspose::Tasks::FontSettings > get_FontSettings() override
Specifies font settings used when rendering project's view.
System::SharedPtr< PdfEncryptionDetails > get_EncryptionDetails() const
Gets a encryption details. If not set, then no encryption will be performed.
This is an abstract base class for classes that allow the user to specify additional options when sav...
Definition: SaveOptions.h:95
Definition: Asn.h:13