SaveOptions.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/object_ext.h>
5 #include <system/enum.h>
6 #include <drawing/color.h>
7 #include <cstdint>
8 
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 class DocumentInfo;
14 namespace Pdf
15 {
16 enum class ApsToXpsSavingMode;
17 class ApsUsingConverter;
18 class FlowConverter;
19 class HtmlConverter;
20 class HtmlSaveOptions;
21 class IWarningCallback;
22 enum class SaveFormat;
23 class SvgSaveOptions;
24 namespace Tests
25 {
26 class DocConverterFlowTests;
27 class DocConverterTextBoxTestsBase;
28 class ExcelConverterTest;
29 class FlowConverterTests;
30 namespace HTML
31 {
32 class Pdf2HtmlConverterTests;
33 class Pdf2HtmlTestUtils;
34 } // namespace HTML
35 class RegressionTests_v17_6;
36 class RegressionTests_v23_08;
37 class RegressionTests_v24_07;
38 class SvgConverterTests;
39 class TextBoxTests;
40 class TextBoxTestsOshared;
41 class TextBoxTestsPdfnewnetLong;
42 class XpsConverterTests;
43 } // namespace Tests
44 class TeXConverter;
45 } // namespace Pdf
46 } // namespace Aspose
47 namespace System
48 {
49 namespace IO
50 {
51 class Stream;
52 } // namespace IO
53 } // namespace System
54 
55 namespace Aspose {
56 
57 namespace Pdf {
58 
62 class ASPOSE_PDF_SHARED_CLASS SaveOptions : public virtual System::Object
63 {
64  typedef SaveOptions ThisType;
65  typedef System::Object BaseType;
66 
67  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
68  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
69 
70 public:
71 
72  class BorderInfo;
74 
75 private:
76  friend class Aspose::Pdf::ApsUsingConverter;
77  friend class Aspose::Pdf::TeXConverter;
78  friend class Aspose::Pdf::FlowConverter;
79  friend class Aspose::Pdf::Tests::ExcelConverterTest;
80  friend class Aspose::Pdf::Tests::FlowConverterTests;
81  friend class Aspose::Pdf::Tests::DocConverterTextBoxTestsBase;
82  friend class Aspose::Pdf::Tests::TextBoxTestsOshared;
83  friend class Aspose::Pdf::Tests::TextBoxTestsPdfnewnetLong;
84  friend class Aspose::Pdf::Tests::TextBoxTests;
85  friend class Aspose::Pdf::Tests::DocConverterFlowTests;
86  friend class Aspose::Pdf::Tests::HTML::Pdf2HtmlTestUtils;
87  friend class Aspose::Pdf::Tests::RegressionTests_v17_6;
88  friend class Aspose::Pdf::Tests::RegressionTests_v23_08;
89  friend class Aspose::Pdf::Tests::RegressionTests_v24_07;
90  friend class Aspose::Pdf::Tests::XpsConverterTests;
91  friend class Aspose::Pdf::Tests::SvgConverterTests;
92  friend class Aspose::Pdf::Tests::HTML::Pdf2HtmlConverterTests;
93 
94 public:
95 
99  enum class HtmlBorderLineType
100  {
104  None = 0,
108  Dotted = 1,
112  Dashed = 2,
116  Solid = 3,
120  Double = 4,
124  Groove = 5,
128  Ridge = 6,
132  Inset = 7,
136  Outset = 8
137  };
138 
143  {
147  Image = 0,
151  Font = 1
152  };
153 
154 
155 public:
156 
160  class ASPOSE_PDF_SHARED_CLASS BorderPartStyle : public System::Object
161  {
162  typedef BorderPartStyle ThisType;
163  typedef System::Object BaseType;
164 
165  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
166  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
167 
169 
170  public:
171 
180 
184  ASPOSE_PDF_SHARED_API int32_t get_WidthInPoints() const;
188  ASPOSE_PDF_SHARED_API void set_WidthInPoints(int32_t value);
189 
190  ASPOSE_PDF_SHARED_API BorderPartStyle();
191 
192  protected:
193 
195 
196  private:
197 
198  int32_t _width;
199 
200  };
201 
206  class ASPOSE_PDF_SHARED_CLASS BorderInfo : public System::Object
207  {
208  typedef BorderInfo ThisType;
209  typedef System::Object BaseType;
210 
211  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
212  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
213 
214  friend class Aspose::Pdf::HtmlConverter;
215 
216  public:
217 
234 
238  ASPOSE_PDF_SHARED_API BorderInfo();
245  ASPOSE_PDF_SHARED_API BorderInfo(System::SharedPtr<SaveOptions::BorderPartStyle> commonStyle);
246 
247  protected:
248 
249  bool get_AtLeastOneBorderSideNeeded();
250 
251  };
252 
257  class ASPOSE_PDF_SHARED_CLASS MarginInfo : public System::Object
258  {
259  typedef MarginInfo ThisType;
260  typedef System::Object BaseType;
261 
262  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
263  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
264 
265  public:
266 
283 
287  ASPOSE_PDF_SHARED_API MarginInfo();
294  ASPOSE_PDF_SHARED_API MarginInfo(System::SharedPtr<SaveOptions::MarginPartStyle> commonMargin);
295 
296  };
297 
301  class ASPOSE_PDF_SHARED_CLASS MarginPartStyle : public System::Object
302  {
303  typedef MarginPartStyle ThisType;
304  typedef System::Object BaseType;
305 
306  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
307  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
308 
310 
311  public:
312 
317  ASPOSE_PDF_SHARED_API bool get_IsAuto() const;
322  ASPOSE_PDF_SHARED_API void set_IsAuto(bool value);
326  ASPOSE_PDF_SHARED_API int32_t get_ValueInPoints() const;
330  ASPOSE_PDF_SHARED_API void set_ValueInPoints(int32_t value);
331 
337  ASPOSE_PDF_SHARED_API MarginPartStyle(int32_t valueInPoints);
343  ASPOSE_PDF_SHARED_API MarginPartStyle(bool isAuto);
344 
345  protected:
346 
347  MarginPartStyle(int32_t valueInPoints, bool isAuto);
348 
349  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(MarginPartStyle, CODEPORTING_ARGS(int32_t valueInPoints, bool isAuto));
351 
352  private:
353 
354  bool _isAuto;
355  int32_t _value;
356 
357  };
358 
364  class ASPOSE_PDF_SHARED_CLASS ResourceSavingInfo : public System::Object
365  {
366  typedef ResourceSavingInfo ThisType;
367  typedef System::Object BaseType;
368 
369  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
370  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
371 
372  friend class Aspose::Pdf::HtmlConverter;
375 
376  public:
377 
383  ASPOSE_PDF_SHARED_API SaveOptions::NodeLevelResourceType get_ResourceType() const;
384 
404 
405  protected:
406 
408 
409  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ResourceSavingInfo, CODEPORTING_ARGS(SaveOptions::NodeLevelResourceType resourceType));
410 
411  private:
412 
414 
416 
417  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ResourceSavingInfo, CODEPORTING_ARGS());
418 
419  };
420 
421 
422 public:
423 
429  ASPOSE_PDF_SHARED_API System::SharedPtr<IWarningCallback> get_WarningHandler() const;
435  ASPOSE_PDF_SHARED_API void set_WarningHandler(System::SharedPtr<IWarningCallback> value);
439  ASPOSE_PDF_SHARED_API Aspose::Pdf::SaveFormat get_SaveFormat() const;
443  ASPOSE_PDF_SHARED_API bool get_CloseResponse() const;
447  ASPOSE_PDF_SHARED_API void set_CloseResponse(bool value);
452  ASPOSE_PDF_SHARED_API bool get_CacheGlyphs() const;
457  ASPOSE_PDF_SHARED_API void set_CacheGlyphs(bool value);
458 
459 protected:
460 
465  ApsToXpsSavingMode ApsAsXpsSavingMode;
472 
476  ASPOSE_PDF_SHARED_API SaveOptions();
477 
478 private:
479 
480  System::SharedPtr<IWarningCallback> _warningHandler;
481  bool _closeResponse;
482  bool pr_CacheGlyphs;
483 
484 };
485 
486 } // namespace Pdf
487 } // namespace Aspose
488 
489 template<>
490 struct EnumMetaInfo<Aspose::Pdf::SaveOptions::HtmlBorderLineType>
491 {
492  static const ASPOSE_PDF_SHARED_API std::array<std::pair<Aspose::Pdf::SaveOptions::HtmlBorderLineType, const char_t*>, 9>& values();
493 };
494 
495 
496 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Save options for export to Html format
Definition: HtmlSaveOptions.h:49
System::SharedPtr< SaveOptions::BorderPartStyle > LeftStyleIfAny
Represents left part(if any) of border
Definition: SaveOptions.h:225
System::SharedPtr< SaveOptions::MarginPartStyle > RightMarginIfAny
Represents right page margin(if any)
Definition: SaveOptions.h:274
System::SharedPtr< SaveOptions::BorderPartStyle > RightStyleIfAny
Represents right part(if any) of border
Definition: SaveOptions.h:229
System::String PngIntermediateFileIfAny
Definition: SaveOptions.h:464
Instance of this class represents information about page margin That can be drown on some result docu...
Definition: SaveOptions.h:257
System::SharedPtr< SaveOptions::BorderPartStyle > BottomStyleIfAny
Represents bottom part(if any) of border
Definition: SaveOptions.h:233
ASPOSE_PDF_SHARED_API void set_CacheGlyphs(bool value)
Sets boolean value which indicates if will font glyphs be cached while preparing aps pages...
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:64
Definition: Artifact.h:71
ASPOSE_PDF_SHARED_API Aspose::Pdf::SaveFormat get_SaveFormat() const
Format of data save.
System::SharedPtr< SaveOptions::MarginPartStyle > LeftMarginIfAny
Represents left page margin(if any)
Definition: SaveOptions.h:282
System::SharedPtr< SaveOptions::MarginPartStyle > TopMarginIfAny
Represents top page margin(if any)
Definition: SaveOptions.h:270
ASPOSE_PDF_SHARED_API void set_CloseResponse(bool value)
Sets boolean value which indicates will Response object be closed after document saved into response...
This class represents set of data that related to external resource file&#39;s saving that occures during...
Definition: SaveOptions.h:364
System::SharedPtr< Aspose::DocumentInfo > DocumentInfoForSaveAsXps
Definition: SaveOptions.h:466
SaveOptions::HtmlBorderLineType LineType
Represents border line&#39;s type - f.e. Dashed or Solid
Definition: SaveOptions.h:179
NodeLevelResourceType
enumerates possible types of saved external resources
Definition: SaveOptions.h:142
bool CustomProcessingCancelled
this flag must set to "true" in custom code if for some reasons proposed file should be processed not...
Definition: SaveOptions.h:403
ASPOSE_PDF_SHARED_API bool get_CloseResponse() const
Gets boolean value which indicates will Response object be closed after document saved into response...
Definition: signed_info.h:13
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
SaveOptions type hold level of abstraction on individual save options
Definition: SaveOptions.h:62
Represents information of one part of border(top, bottom, left side or right side) ...
Definition: SaveOptions.h:160
ASPOSE_PDF_SHARED_API void set_WarningHandler(System::SharedPtr< IWarningCallback > value)
Callback to handle any warnings generated. The WarningHandler returns ReturnAction enum item specifyi...
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: SideBySidePdfComparer.h:24
System::SharedPtr< System::IO::Stream > ContentStream
Set by converter. Represents binary content of saved file.
Definition: SaveOptions.h:395
HtmlBorderLineType
Represents line types that can be used in result document for drawing borders or another lines ...
Definition: SaveOptions.h:99
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
System::SharedPtr< SaveOptions::MarginPartStyle > BottomMarginIfAny
Represents bottom page margin(if any)
Definition: SaveOptions.h:278
System::String PlainApsIntermediateTempFileIfAny
Sometimes we need use temp file to save APS during conversion to avoid OOM exceptions in PalZipWriter...
Definition: SaveOptions.h:471
System::String ApsIntermediateFileIfAny
Definition: SaveOptions.h:462
means loading of document in HTML format
ASPOSE_PDF_SHARED_API bool get_CacheGlyphs() const
Gets boolean value which indicates if will font glyphs be cached while preparing aps pages...
Aspose::Pdf::SaveFormat _saveFormat
Definition: SaveOptions.h:461
Represents image.
Definition: Image.h:80
Save options for export to SVG format
Definition: SvgSaveOptions.h:17
ASPOSE_PDF_SHARED_API SaveOptions()
Default ctor.
System::Drawing::Color Color
Represents border line&#39;s line color
Definition: SaveOptions.h:175
ASPOSE_PDF_SHARED_API System::SharedPtr< IWarningCallback > get_WarningHandler() const
Callback to handle any warnings generated. The WarningHandler returns ReturnAction enum item specifyi...
Instance of this class represents information about border That can be drown on some result document...
Definition: SaveOptions.h:206
System::SharedPtr< SaveOptions::BorderPartStyle > TopStyleIfAny
Represents top part(if any) of border
Definition: SaveOptions.h:221
Represents information of one part of margin(top, botom, left side or right side) ...
Definition: SaveOptions.h:301
means saving without change of format, i.e. as PDF use it please instead of &#39;SaveFormat.None&#39;, that is obsolete one
ApsToXpsSavingMode ApsAsXpsSavingMode
Definition: SaveOptions.h:465
System::String XpsIntermediateFileIfAny
Definition: SaveOptions.h:463
SaveFormat
Specifies format
Definition: SaveFormat.h:16
System::String SupposedFileName
Set by converter. Supposed file name that goes from converter to code of custom method Can be use in ...
Definition: SaveOptions.h:390
Whole PDF file will be submitted.