TeXLoadOptions.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/string.h>
5 #include <system/idisposable.h>
6 #include <drawing/size_f.h>
7 
8 #include "Aspose.PDF.Cpp/LoadOptions.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Tests
16 {
17 namespace Generator
18 {
19 class LatexTests;
20 } // namespace Generator
21 } // namespace Tests
22 class TeXFileSystemOutputDirectory;
23 class TeXFragment;
24 class TeXInputDirectoryAdapter;
25 class TeXOutputDirectoryAdapter;
26 class TeXToPdfConverter;
27 } // namespace Pdf
28 namespace TeX
29 {
30 namespace IO
31 {
32 class IInputWorkingDirectory;
33 class IOutputWorkingDirectory;
34 } // namespace IO
35 enum class TeXJobResult;
36 class TeXOptions;
37 } // namespace TeX
38 } // namespace Aspose
39 namespace System
40 {
41 class DateTime;
42 namespace IO
43 {
44 class Stream;
45 } // namespace IO
46 } // namespace System
47 
48 namespace Aspose {
49 
50 namespace Pdf {
51 
55 enum class TeXLoadResult
56 {
68  Spotless,
81 };
82 
86 class ASPOSE_PDF_SHARED_CLASS ITeXInputDirectory : public System::IDisposable
87 {
90 
91  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
92  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
93 
94 public:
95 
103  virtual System::SharedPtr<System::IO::Stream> GetFile(System::String fileName, System::String& fullName, bool searchSubdirectories = false) = 0;
104 
105 };
106 
110 class ASPOSE_PDF_SHARED_CLASS ITeXOutputDirectory : public virtual Aspose::Pdf::ITeXInputDirectory
111 {
114 
115  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
116  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
117 
118 public:
119 
126  virtual System::SharedPtr<System::IO::Stream> GetOutputFile(System::String fileName, System::String& fullName) = 0;
127 
128 };
129 
133 class ASPOSE_PDF_SHARED_CLASS TeXFileSystemInputDirectory : public virtual Aspose::Pdf::ITeXInputDirectory
134 {
137 
138  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
139  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
140 
142 
143 public:
144 
149  ASPOSE_PDF_SHARED_API TeXFileSystemInputDirectory(System::String basePath);
150 
158  ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> GetFile(System::String fileName, System::String& fullName, bool searchSubdirectories = false) override;
162  ASPOSE_PDF_SHARED_API void Dispose() override;
163 
164 protected:
165 
167 
169 
171 
172 private:
173 
175 
176 };
177 
182 {
183  typedef TeXFileSystemOutputDirectory ThisType;
186 
187  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
188  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
189 
190 public:
191 
196  ASPOSE_PDF_SHARED_API TeXFileSystemOutputDirectory(System::String basePath);
197 
204  ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> GetOutputFile(System::String fileName, System::String& fullName) override;
205 
206 };
207 
213 class ASPOSE_PDF_SHARED_CLASS TeXMemoryOutputDirectory : public Aspose::Pdf::ITeXOutputDirectory
214 {
215  typedef TeXMemoryOutputDirectory ThisType;
216  typedef Aspose::Pdf::ITeXOutputDirectory BaseType;
217 
218  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
219  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
220 
221 public:
222 
226  ASPOSE_PDF_SHARED_API TeXMemoryOutputDirectory();
227 
236  ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> GetFile(System::String fileName, System::String& fullName, bool searchSubdirectories = false) override;
243  ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> GetOutputFile(System::String fileName, System::String& fullName) override;
247  ASPOSE_PDF_SHARED_API void Dispose() override;
248 
249 private:
250 
252 
253 };
254 
258 class ASPOSE_PDF_SHARED_CLASS TeXLoadOptions : public Aspose::Pdf::LoadOptions
259 {
260  typedef TeXLoadOptions ThisType;
261  typedef Aspose::Pdf::LoadOptions BaseType;
262 
263  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
264  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
265 
267  friend class Aspose::Pdf::TeXToPdfConverter;
268  friend class Aspose::Pdf::Tests::Generator::LatexTests;
269 
270 public:
271 
275  ASPOSE_PDF_SHARED_API System::String get_JobName() const;
279  ASPOSE_PDF_SHARED_API void set_JobName(System::String value);
283  ASPOSE_PDF_SHARED_API System::SharedPtr<ITeXInputDirectory> get_InputDirectory();
287  ASPOSE_PDF_SHARED_API void set_InputDirectory(System::SharedPtr<ITeXInputDirectory> value);
291  ASPOSE_PDF_SHARED_API System::SharedPtr<ITeXOutputDirectory> get_OutputDirectory();
295  ASPOSE_PDF_SHARED_API void set_OutputDirectory(System::SharedPtr<ITeXOutputDirectory> value);
301  ASPOSE_PDF_SHARED_API System::SharedPtr<ITeXInputDirectory> get_RequiredInputDirectory();
307  ASPOSE_PDF_SHARED_API void set_RequiredInputDirectory(System::SharedPtr<ITeXInputDirectory> value);
314  ASPOSE_PDF_SHARED_API bool get_Repeat();
321  ASPOSE_PDF_SHARED_API void set_Repeat(bool value);
325  ASPOSE_PDF_SHARED_API bool get_SubsetFonts();
329  ASPOSE_PDF_SHARED_API void set_SubsetFonts(bool value);
333  ASPOSE_PDF_SHARED_API bool get_ShowTerminalOutput() const;
337  ASPOSE_PDF_SHARED_API void set_ShowTerminalOutput(bool value);
341  ASPOSE_PDF_SHARED_API System::DateTime get_DateTime();
345  ASPOSE_PDF_SHARED_API void set_DateTime(System::DateTime value);
349  ASPOSE_PDF_SHARED_API bool get_NoLigatures();
353  ASPOSE_PDF_SHARED_API void set_NoLigatures(bool value);
357  ASPOSE_PDF_SHARED_API bool get_RasterizeFormulas();
361  ASPOSE_PDF_SHARED_API void set_RasterizeFormulas(bool value);
362 
366  ASPOSE_PDF_SHARED_API TeXLoadOptions();
367 
372  ASPOSE_PDF_SHARED_API TeXLoadResult GetLoadResult();
373 
374 protected:
375 
376  void set__texJobResult(TeX::TeXJobResult value);
377  System::SharedPtr<Aspose::TeX::TeXOptions> get_TeXOptions() const;
378  System::SharedPtr<Aspose::TeX::IO::IInputWorkingDirectory> get_InputDirectoryInternal() const;
379  System::SharedPtr<Aspose::TeX::IO::IOutputWorkingDirectory> get_OutputDirectoryInternal() const;
380  System::SharedPtr<Aspose::TeX::IO::IInputWorkingDirectory> get_RequiredInputDirectoryInternal() const;
381  System::Drawing::SizeF get_FragmentSize() const;
382  void set_FragmentSize(System::Drawing::SizeF value);
383 
384 private:
385 
386  System::String _jobName;
390  System::SharedPtr<TeXInputDirectoryAdapter> _requiredInputDirectory;
391  bool _showTerminalOutput;
392  TeXLoadResult _loadResult;
393  System::Drawing::SizeF pr_FragmentSize;
394 
395 };
396 
401 class ASPOSE_PDF_SHARED_CLASS LatexLoadOptions : public Aspose::Pdf::TeXLoadOptions
402 {
403  typedef LatexLoadOptions ThisType;
404  typedef Aspose::Pdf::TeXLoadOptions BaseType;
405 
406  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
407  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
408 
409 };
410 
411 } // namespace Pdf
412 } // namespace Aspose
413 
414 
System::SharedPtr< Aspose::TeX::IO::IInputWorkingDirectory > get_Impl() const
Warnings present on loading and compiling.
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Spotless result of loading and compiling.
Fatal errors present on loading and compiling.
means saving in TEX format i.e. format suitable for Latex text editor
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(TeXFileSystemInputDirectory, CODEPORTING_ARGS(System::SharedPtr< Aspose::TeX::IO::IInputWorkingDirectory > impl))
Definition: Artifact.h:67
Invalid result of loading and compiling.
ASPOSE_PDF_SHARED_API void Dispose() override
Disposes the instance.
Implements the regular file system&#39;s method for getting a file stream to read from.
Definition: TeXLoadOptions.h:133
Definition: signed_info.h:13
Represents options for loading/importing TeX file into PDF document.
Definition: TeXLoadOptions.h:401
Interface of generalized TeX input directory.
Definition: TeXLoadOptions.h:86
ASPOSE_PDF_SHARED_API System::SharedPtr< System::IO::Stream > GetFile(System::String fileName, System::String &fullName, bool searchSubdirectories=false) override
Returns the stream to read from.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:29
Interface of generalized TeX output directory.
Definition: TeXLoadOptions.h:110
Implements fetching an output stream from memory. You can use it, for example, when you don&#39;t want th...
Definition: TeXLoadOptions.h:213
Definition: AFRelationship.h:4
ASPOSE_PDF_SHARED_API TeXFileSystemInputDirectory(System::String basePath)
Creates new instance.
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:49
Errors present on loading and compiling.
Implements the regular file system&#39;s method for getting a file stream to write to.
Definition: TeXLoadOptions.h:181
Represents options for loading/importing TeX file into PDF document.
Definition: TeXLoadOptions.h:258
TeXLoadResult
Results for TeX load and compiling.
Definition: TeXLoadOptions.h:55
means saving without change of format, i.e. as PDF use it please instead of &#39;SaveFormat.None&#39;, that is obsolete one
Represents a pair of single-precision floating point values that represent width and height of an ima...
Definition: size_f.h:13
Represents TeX fragment.
Definition: TeXFragment.h:53
Loading not executed yet.
Whole PDF file will be submitted.
LoadOptions type holds level of abstraction on individual load options
Definition: LoadOptions.h:190