UnifiedSaveOptions.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/multicast_delegate.h>
5 #include <system/array.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/SaveOptions.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 class ConversionProgressEventsTranslator;
16 class DocConverter;
17 class Document;
18 class HtmlConverter;
19 class PdfToApsConverter;
20 class PptxExporter;
21 } // namespace Pdf
22 } // namespace Aspose
23 
24 namespace Aspose {
25 
26 namespace Pdf {
27 
33 {
50 };
51 
52 // UnifiedSaveOptions represents save options for conversions that internaly use APS
53 // as intermediate conversion format.
54 // Since we cannot name it directly, term "Unified" used in public API
58 class ASPOSE_PDF_SHARED_CLASS IPipelineOptions : public virtual System::Object
59 {
60  typedef IPipelineOptions ThisType;
61  typedef System::Object BaseType;
62 
63  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
64  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
65 
66 public:
67 
71  virtual int32_t get_BatchSize() = 0;
75  virtual void set_BatchSize(int32_t value) = 0;
76 
77 };
78 
82 class ASPOSE_PDF_SHARED_CLASS IPageSetOptions : public virtual System::Object
83 {
84  typedef IPageSetOptions ThisType;
85  typedef System::Object BaseType;
86 
87  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
88  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
89 
90 public:
91 
95  virtual System::ArrayPtr<int32_t> get_ExplicitListOfSavedPages() = 0;
99  virtual void set_ExplicitListOfSavedPages(System::ArrayPtr<int32_t> value) = 0;
100 
101 };
102 
107 class ASPOSE_PDF_SHARED_CLASS UnifiedSaveOptions : public Aspose::Pdf::SaveOptions
108 {
111 
112  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
113  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
114 
115  friend class Aspose::Pdf::PdfToApsConverter;
116  friend class Aspose::Pdf::HtmlConverter;
117  friend class Aspose::Pdf::DocConverter;
118  friend class Aspose::Pdf::PptxExporter;
119 
120 public:
121 
130  using ConversionProgressEventHandler = System::MulticastDelegate<void(System::SharedPtr<UnifiedSaveOptions::ProgressEventHandlerInfo>)>;
131 
132 protected:
133 
134  using OnePageProcessedEventHandler = System::MulticastDelegate<void(int32_t)>;
135 
136 
137 public:
138 
147  class ASPOSE_PDF_SHARED_CLASS ProgressEventHandlerInfo : public System::Object
148  {
149  typedef ProgressEventHandlerInfo ThisType;
150  typedef System::Object BaseType;
151 
152  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
153  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
154 
155  friend class Aspose::Pdf::ConversionProgressEventsTranslator;
156 
157  public:
158 
166  int32_t Value;
170  int32_t MaxValue;
171 
172  protected:
173 
175 
176  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ProgressEventHandlerInfo, CODEPORTING_ARGS());
177 
178  };
179 
180 
181 public:
182 
196 
202  ASPOSE_PDF_SHARED_API bool get_ExtractOcrSublayerOnly() const;
208  ASPOSE_PDF_SHARED_API void set_ExtractOcrSublayerOnly(bool value);
209 
210  ASPOSE_PDF_SHARED_API UnifiedSaveOptions();
211 
212 protected:
213 
214  static const int32_t DefaultBatchSize;
230 
231  int32_t GetNumberOfConvertiblePages(System::SharedPtr<Document> document);
232 
233 private:
234 
235  bool extractOcrSublayerOnly;
236 
237 };
238 
239 } // namespace Pdf
240 } // namespace Aspose
241 
242 
ProgressEventType
This enum describes possible progress event types that can occure during conversion ...
Definition: UnifiedSaveOptions.h:32
This class represents saving options for saving that uses unified conversion way (with unified intern...
Definition: UnifiedSaveOptions.h:107
int32_t MaxValue
maximum possible value of progress value
Definition: UnifiedSaveOptions.h:170
means that occured event informs about end of analysis of one of pages before conversion ...
means that occured event informs about finished saving of one result page
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Defines conversion options related to a set of pages to convert.
Definition: UnifiedSaveOptions.h:82
System::MulticastDelegate< void(System::SharedPtr< UnifiedSaveOptions::ProgressEventHandlerInfo >)> ConversionProgressEventHandler
Definition: UnifiedSaveOptions.h:130
static const int32_t DefaultBatchSize
Definition: UnifiedSaveOptions.h:214
means that occured event informs about total progress of conversion
ProgressEventType EventType
Type of progress event that occured
Definition: UnifiedSaveOptions.h:162
SaveOptions type hold level of abstraction on individual save options
Definition: SaveOptions.h:59
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
means that occured event informs about creation of one result page before phisical export ...
bool TryMergeAdjacentSameBackgroundImages
Sometimes PDFs contain background images (of pages or table cells) constructed from several same tili...
Definition: UnifiedSaveOptions.h:195
Definition: AFRelationship.h:4
Defines conversion options related to pipeline configuration.
Definition: UnifiedSaveOptions.h:58
/internal enum ConversionAlgorithmTypes { / EachPageGoesAllStagesThenNextPageGoesThrowAllStages, / AllPagesLayoutedThenAllPagesExported /}
Definition: UnifiedSaveOptions.h:147
int32_t Value
current value of progress value
Definition: UnifiedSaveOptions.h:166
System::SharedPtr< ConversionProgressEventsTranslator > ProgressEventsRetranslator
Represents internal progress events processor that works during conversion and translates conversion ...
Definition: UnifiedSaveOptions.h:229
means saving without change of format, i.e. as PDF use it please instead of &#39;SaveFormat.None&#39;, that is obsolete one
System::MulticastDelegate< void(int32_t)> OnePageProcessedEventHandler
Definition: UnifiedSaveOptions.h:134
Whole PDF file will be submitted.