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 HtmlConverter;
19 class HtmlSaveOptions;
20 class IWarningCallback;
21 enum class SaveFormat;
22 class SvgSaveOptions;
23 namespace Tests
24 {
25 class DocConverterFlowTests;
26 class DocConverterTextBoxTestsBase;
27 class ExcelConverterTest;
28 class FlowConverterTests;
29 namespace HTML
30 {
31 class Pdf2HtmlConverterTests;
32 class Pdf2HtmlTestUtils;
33 } // namespace HTML
34 class RegressionTests_v17_6;
35 class RegressionTests_v23_08;
36 class SvgConverterTests;
37 class TextBoxTests;
38 class TextBoxTestsOshared;
39 class TextBoxTestsPdfnewnetLong;
40 class XpsConverterTests;
41 } // namespace Tests
42 class TeXConverter;
43 } // namespace Pdf
44 } // namespace Aspose
45 namespace System
46 {
47 namespace IO
48 {
49 class Stream;
50 } // namespace IO
51 } // namespace System
52 
53 namespace Aspose {
54 
55 namespace Pdf {
56 
60 class ASPOSE_PDF_SHARED_CLASS SaveOptions : public virtual System::Object
61 {
62  typedef SaveOptions ThisType;
63  typedef System::Object BaseType;
64 
65  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
66  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
67 
68 public:
69 
70  class BorderInfo;
72 
73 private:
74  friend class Aspose::Pdf::ApsUsingConverter;
75  friend class Aspose::Pdf::TeXConverter;
76  friend class Aspose::Pdf::Tests::ExcelConverterTest;
77  friend class Aspose::Pdf::Tests::FlowConverterTests;
78  friend class Aspose::Pdf::Tests::DocConverterTextBoxTestsBase;
79  friend class Aspose::Pdf::Tests::TextBoxTestsOshared;
80  friend class Aspose::Pdf::Tests::TextBoxTestsPdfnewnetLong;
81  friend class Aspose::Pdf::Tests::TextBoxTests;
82  friend class Aspose::Pdf::Tests::DocConverterFlowTests;
83  friend class Aspose::Pdf::Tests::HTML::Pdf2HtmlTestUtils;
84  friend class Aspose::Pdf::Tests::RegressionTests_v17_6;
85  friend class Aspose::Pdf::Tests::RegressionTests_v23_08;
86  friend class Aspose::Pdf::Tests::XpsConverterTests;
87  friend class Aspose::Pdf::Tests::SvgConverterTests;
88  friend class Aspose::Pdf::Tests::HTML::Pdf2HtmlConverterTests;
89 
90 public:
91 
95  enum class HtmlBorderLineType
96  {
100  None = 0,
104  Dotted = 1,
108  Dashed = 2,
112  Solid = 3,
116  Double = 4,
120  Groove = 5,
124  Ridge = 6,
128  Inset = 7,
132  Outset = 8
133  };
134 
139  {
143  Image = 0,
147  Font = 1
148  };
149 
150 
151 public:
152 
156  class ASPOSE_PDF_SHARED_CLASS BorderPartStyle : public System::Object
157  {
158  typedef BorderPartStyle ThisType;
159  typedef System::Object BaseType;
160 
161  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
162  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
163 
165 
166  public:
167 
176 
180  ASPOSE_PDF_SHARED_API int32_t get_WidthInPoints() const;
184  ASPOSE_PDF_SHARED_API void set_WidthInPoints(int32_t value);
185 
186  ASPOSE_PDF_SHARED_API BorderPartStyle();
187 
188  protected:
189 
191 
192  private:
193 
194  int32_t _width;
195 
196  };
197 
202  class ASPOSE_PDF_SHARED_CLASS BorderInfo : public System::Object
203  {
204  typedef BorderInfo ThisType;
205  typedef System::Object BaseType;
206 
207  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
208  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
209 
210  friend class Aspose::Pdf::HtmlConverter;
211 
212  public:
213 
230 
234  ASPOSE_PDF_SHARED_API BorderInfo();
241  ASPOSE_PDF_SHARED_API BorderInfo(System::SharedPtr<SaveOptions::BorderPartStyle> commonStyle);
242 
243  protected:
244 
245  bool get_AtLeastOneBorderSideNeeded();
246 
247  };
248 
253  class ASPOSE_PDF_SHARED_CLASS MarginInfo : public System::Object
254  {
255  typedef MarginInfo ThisType;
256  typedef System::Object BaseType;
257 
258  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
259  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
260 
261  public:
262 
279 
283  ASPOSE_PDF_SHARED_API MarginInfo();
290  ASPOSE_PDF_SHARED_API MarginInfo(System::SharedPtr<SaveOptions::MarginPartStyle> commonMargin);
291 
292  };
293 
297  class ASPOSE_PDF_SHARED_CLASS MarginPartStyle : public System::Object
298  {
299  typedef MarginPartStyle ThisType;
300  typedef System::Object BaseType;
301 
302  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
303  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
304 
306 
307  public:
308 
313  ASPOSE_PDF_SHARED_API bool get_IsAuto() const;
318  ASPOSE_PDF_SHARED_API void set_IsAuto(bool value);
322  ASPOSE_PDF_SHARED_API int32_t get_ValueInPoints() const;
326  ASPOSE_PDF_SHARED_API void set_ValueInPoints(int32_t value);
327 
333  ASPOSE_PDF_SHARED_API MarginPartStyle(int32_t valueInPoints);
339  ASPOSE_PDF_SHARED_API MarginPartStyle(bool isAuto);
340 
341  protected:
342 
343  MarginPartStyle(int32_t valueInPoints, bool isAuto);
344 
345  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(MarginPartStyle, CODEPORTING_ARGS(int32_t valueInPoints, bool isAuto));
347 
348  private:
349 
350  bool _isAuto;
351  int32_t _value;
352 
353  };
354 
360  class ASPOSE_PDF_SHARED_CLASS ResourceSavingInfo : public System::Object
361  {
362  typedef ResourceSavingInfo ThisType;
363  typedef System::Object BaseType;
364 
365  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
366  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
367 
368  friend class Aspose::Pdf::HtmlConverter;
371 
372  public:
373 
379  ASPOSE_PDF_SHARED_API SaveOptions::NodeLevelResourceType get_ResourceType() const;
380 
400 
401  protected:
402 
404 
405  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ResourceSavingInfo, CODEPORTING_ARGS(SaveOptions::NodeLevelResourceType resourceType));
406 
407  private:
408 
410 
412 
413  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(ResourceSavingInfo, CODEPORTING_ARGS());
414 
415  };
416 
417 
418 public:
419 
425  ASPOSE_PDF_SHARED_API System::SharedPtr<IWarningCallback> get_WarningHandler() const;
431  ASPOSE_PDF_SHARED_API void set_WarningHandler(System::SharedPtr<IWarningCallback> value);
435  ASPOSE_PDF_SHARED_API Aspose::Pdf::SaveFormat get_SaveFormat() const;
439  ASPOSE_PDF_SHARED_API bool get_CloseResponse() const;
443  ASPOSE_PDF_SHARED_API void set_CloseResponse(bool value);
448  ASPOSE_PDF_SHARED_API bool get_CacheGlyphs() const;
453  ASPOSE_PDF_SHARED_API void set_CacheGlyphs(bool value);
454 
455 protected:
456 
461  ApsToXpsSavingMode ApsAsXpsSavingMode;
468 
472  ASPOSE_PDF_SHARED_API SaveOptions();
473 
474 private:
475 
476  System::SharedPtr<IWarningCallback> _warningHandler;
477  bool _closeResponse;
478  bool pr_CacheGlyphs;
479 
480 };
481 
482 } // namespace Pdf
483 } // namespace Aspose
484 
485 template<>
486 struct EnumMetaInfo<Aspose::Pdf::SaveOptions::HtmlBorderLineType>
487 {
488  static const ASPOSE_PDF_SHARED_API std::array<std::pair<Aspose::Pdf::SaveOptions::HtmlBorderLineType, const char_t*>, 9>& values();
489 };
490 
491 
492 
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:221
System::SharedPtr< SaveOptions::MarginPartStyle > RightMarginIfAny
Represents right page margin(if any)
Definition: SaveOptions.h:270
System::SharedPtr< SaveOptions::BorderPartStyle > RightStyleIfAny
Represents right part(if any) of border
Definition: SaveOptions.h:225
System::String PngIntermediateFileIfAny
Definition: SaveOptions.h:460
Instance of this class represents information about page margin That can be drown on some result docu...
Definition: SaveOptions.h:253
System::SharedPtr< SaveOptions::BorderPartStyle > BottomStyleIfAny
Represents bottom part(if any) of border
Definition: SaveOptions.h:229
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:67
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:278
System::SharedPtr< SaveOptions::MarginPartStyle > TopMarginIfAny
Represents top page margin(if any)
Definition: SaveOptions.h:266
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:360
System::SharedPtr< Aspose::DocumentInfo > DocumentInfoForSaveAsXps
Definition: SaveOptions.h:462
SaveOptions::HtmlBorderLineType LineType
Represents border line&#39;s type - f.e. Dashed or Solid
Definition: SaveOptions.h:175
NodeLevelResourceType
enumerates possible types of saved external resources
Definition: SaveOptions.h:138
bool CustomProcessingCancelled
this flag must set to "true" in custom code if for some reasons proposed file should be processed not...
Definition: SaveOptions.h:399
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
SaveOptions type hold level of abstraction on individual save options
Definition: SaveOptions.h:60
Represents information of one part of border(top, bottom, left side or right side) ...
Definition: SaveOptions.h:156
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: fwd.h:22
System::SharedPtr< System::IO::Stream > ContentStream
Set by converter. Represents binary content of saved file.
Definition: SaveOptions.h:391
HtmlBorderLineType
Represents line types that can be used in result document for drawing borders or another lines ...
Definition: SaveOptions.h:95
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:274
System::String PlainApsIntermediateTempFileIfAny
Sometimes we need use temp file to save APS during conversion to avoid OOM exceptions in PalZipWriter...
Definition: SaveOptions.h:467
System::String ApsIntermediateFileIfAny
Definition: SaveOptions.h:458
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:457
Represents image.
Definition: Image.h:66
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:171
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:202
System::SharedPtr< SaveOptions::BorderPartStyle > TopStyleIfAny
Represents top part(if any) of border
Definition: SaveOptions.h:217
Represents information of one part of margin(top, botom, left side or right side) ...
Definition: SaveOptions.h:297
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:461
System::String XpsIntermediateFileIfAny
Definition: SaveOptions.h:459
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:386
Whole PDF file will be submitted.