Aspose::Words::Saving::SvgSaveOptions class
Contents
[
Hide
]SvgSaveOptions class
Can be used to specify additional options when saving a document into the Svg format. To learn more, visit the Specify Save Options documentation article.
class SvgSaveOptions : public Aspose::Words::Saving::FixedPageSaveOptions
Methods
Method | Description |
---|---|
static CreateSaveOptions(Aspose::Words::SaveFormat) | Creates a save options object of a class suitable for the specified save format. |
static CreateSaveOptions(const System::String&) | Creates a save options object of a class suitable for the file extension specified in the given file name. |
Equals(System::SharedPtr<System::Object>) override | Determines whether the specified object is equal in value to the current object. |
get_AllowEmbeddingPostScriptFonts() const | Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false. |
get_ColorMode() const | Gets or sets a value determining how colors are rendered. |
get_CustomTimeZoneInfo() const | Gets or sets custom local time zone used for date/time fields. |
get_DefaultTemplate() const | Gets or sets path to default template (including filename). Default value for this property is empty string. |
get_Dml3DEffectsRenderingMode() const | Gets a value determining how 3D effects are rendered. |
virtual get_DmlEffectsRenderingMode() | Gets or sets a value determining how DrawingML effects are rendered. |
get_DmlRenderingMode() const | Gets or sets a value determining how DrawingML shapes are rendered. |
get_ExportEmbeddedImages() const | Specified whether images should be embedded into SVG document as base64. Note setting this flag can significantly increase size of output SVG file. |
get_ExportGeneratorName() const | When true, causes the name and version of Aspose.Words to be embedded into produced files. Default value is true. |
get_FitToViewPort() const | Specifies if the output SVG should fill the available viewport area (browser window or container). When set to true width and height of output SVG are set to 100%. The default value is false. |
get_ImlRenderingMode() const | Gets or sets a value determining how ink (InkML) objects are rendered. |
get_JpegQuality() const | Gets or sets a value determining the quality of the JPEG images inside Html document. |
get_MaxImageResolution() const | Gets or sets a value in pixels per inch that limits resolution of exported raster images. Default value is zero. |
get_MemoryOptimization() const | Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. |
get_MetafileRenderingOptions() const | Allows to specify metafile rendering options. |
get_NumeralFormat() const | Gets or sets NumeralFormat used for rendering of numerals. European numerals are used by default. |
virtual get_OptimizeOutput() | Flag indicates whether it is required to optimize output. If this flag is set redundant nested canvases and empty canvases are removed, also neighbor glyphs with the same formatting are concatenated. Note: The accuracy of the content display may be affected if this property is set to true. Default is false. |
get_PageSavingCallback() const | Allows to control how separate pages are saved when a document is exported to fixed page format. |
get_PageSet() const | Gets or sets the pages to render. Default is all the pages in the document. |
get_PrettyFormat() const | When true, pretty formats output where applicable. Default value is false. |
get_ProgressCallback() const | Called during saving a document and accepts data about saving progress. |
get_ResourceSavingCallback() const | Allows to control how resources (images) are saved when a document is exported to SVG format. |
get_ResourcesFolder() const | Specifies the physical folder where resources (images) are saved when exporting a document to Svg format. Default is null. |
get_ResourcesFolderAlias() const | Specifies the name of the folder used to construct image URIs written into an SVG document. Default is null. |
get_SaveFormat() override | Specifies the format in which the document will be saved if this save options object is used. Can only be Svg. |
get_ShowPageBorder() const | Controls whether a border is added to the outline of the page. Default is true. |
get_TempFolder() const | Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used. |
get_TextOutputMode() const | Gets or sets a value determining how text should be rendered in SVG. |
get_UpdateCreatedTimeProperty() const | Gets a value determining whether the CreatedTime property is updated before saving. Default value is false;. |
get_UpdateFields() const | Gets or sets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true. |
get_UpdateLastPrintedProperty() const | Gets or sets a value determining whether the LastPrinted property is updated before saving. |
get_UpdateLastSavedTimeProperty() const | Gets or sets a value determining whether the LastSavedTime property is updated before saving. |
get_UseAntiAliasing() const | Gets or sets a value determining whether or not to use anti-aliasing for rendering. |
get_UseHighQualityRendering() const | Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. |
GetType() const override | |
Is(const System::TypeInfo&) const override | |
set_AllowEmbeddingPostScriptFonts(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_AllowEmbeddingPostScriptFonts. |
set_ColorMode(Aspose::Words::Saving::ColorMode) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_ColorMode. |
set_CustomTimeZoneInfo(const System::SharedPtr<System::TimeZoneInfo>&) | Setter for Aspose::Words::Saving::SaveOptions::get_CustomTimeZoneInfo. |
set_DefaultTemplate(const System::String&) | Setter for Aspose::Words::Saving::SaveOptions::get_DefaultTemplate. |
set_Dml3DEffectsRenderingMode(Aspose::Words::Saving::Dml3DEffectsRenderingMode) | Sets a value determining how 3D effects are rendered. |
virtual set_DmlEffectsRenderingMode(Aspose::Words::Saving::DmlEffectsRenderingMode) | Setter for Aspose::Words::Saving::SaveOptions::get_DmlEffectsRenderingMode. |
set_DmlRenderingMode(Aspose::Words::Saving::DmlRenderingMode) | Setter for Aspose::Words::Saving::SaveOptions::get_DmlRenderingMode. |
set_ExportEmbeddedImages(bool) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_ExportEmbeddedImages. |
set_ExportGeneratorName(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_ExportGeneratorName. |
set_FitToViewPort(bool) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_FitToViewPort. |
set_ImlRenderingMode(Aspose::Words::Saving::ImlRenderingMode) | Setter for Aspose::Words::Saving::SaveOptions::get_ImlRenderingMode. |
set_JpegQuality(int32_t) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_JpegQuality. |
set_MaxImageResolution(int32_t) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_MaxImageResolution. |
set_MemoryOptimization(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_MemoryOptimization. |
set_MetafileRenderingOptions(const System::SharedPtr<Aspose::Words::Saving::MetafileRenderingOptions>&) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_MetafileRenderingOptions. |
set_NumeralFormat(Aspose::Words::Saving::NumeralFormat) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_NumeralFormat. |
virtual set_OptimizeOutput(bool) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_OptimizeOutput. |
set_PageSavingCallback(const System::SharedPtr<Aspose::Words::Saving::IPageSavingCallback>&) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_PageSavingCallback. |
set_PageSet(const System::SharedPtr<Aspose::Words::Saving::PageSet>&) | Setter for Aspose::Words::Saving::FixedPageSaveOptions::get_PageSet. |
set_PrettyFormat(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_PrettyFormat. |
set_ProgressCallback(const System::SharedPtr<Aspose::Words::Saving::IDocumentSavingCallback>&) | Setter for Aspose::Words::Saving::SaveOptions::get_ProgressCallback. |
set_ResourceSavingCallback(const System::SharedPtr<Aspose::Words::Saving::IResourceSavingCallback>&) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_ResourceSavingCallback. |
set_ResourcesFolder(const System::String&) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_ResourcesFolder. |
set_ResourcesFolderAlias(const System::String&) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_ResourcesFolderAlias. |
set_SaveFormat(Aspose::Words::SaveFormat) override | Setter for Aspose::Words::Saving::SvgSaveOptions::get_SaveFormat. |
set_ShowPageBorder(bool) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_ShowPageBorder. |
set_TempFolder(const System::String&) | Setter for Aspose::Words::Saving::SaveOptions::get_TempFolder. |
set_TextOutputMode(Aspose::Words::Saving::SvgTextOutputMode) | Setter for Aspose::Words::Saving::SvgSaveOptions::get_TextOutputMode. |
set_UpdateCreatedTimeProperty(bool) | Sets a value determining whether the CreatedTime property is updated before saving. Default value is false;. |
set_UpdateFields(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_UpdateFields. |
set_UpdateLastPrintedProperty(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_UpdateLastPrintedProperty. |
set_UpdateLastSavedTimeProperty(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_UpdateLastSavedTimeProperty. |
set_UseAntiAliasing(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_UseAntiAliasing. |
set_UseHighQualityRendering(bool) | Setter for Aspose::Words::Saving::SaveOptions::get_UseHighQualityRendering. |
SvgSaveOptions() | |
static Type() |
Examples
Shows how to manipulate and print the URIs of linked resources created while converting a document to .svg.
void SvgResourceFolder()
{
auto doc = MakeObject<Document>(MyDir + u"Rendering.docx");
auto options = MakeObject<SvgSaveOptions>();
options->set_SaveFormat(SaveFormat::Svg);
options->set_ExportEmbeddedImages(false);
options->set_ResourcesFolder(ArtifactsDir + u"SvgResourceFolder");
options->set_ResourcesFolderAlias(ArtifactsDir + u"SvgResourceFolderAlias");
options->set_ShowPageBorder(false);
options->set_ResourceSavingCallback(MakeObject<ExSvgSaveOptions::ResourceUriPrinter>());
System::IO::Directory::CreateDirectory_(options->get_ResourcesFolderAlias());
doc->Save(ArtifactsDir + u"SvgSaveOptions.SvgResourceFolder.svg", options);
}
class ResourceUriPrinter : public IResourceSavingCallback
{
public:
ResourceUriPrinter() : mSavedResourceCount(0)
{
}
private:
int mSavedResourceCount;
void ResourceSaving(SharedPtr<ResourceSavingArgs> args) override
{
std::cout << "Resource #" << ++mSavedResourceCount << " \"" << args->get_ResourceFileName() << "\"" << std::endl;
std::cout << (String(u"\t") + args->get_ResourceFileUri()) << std::endl;
}
};
See Also
- Class FixedPageSaveOptions
- Namespace Aspose::Words::Saving
- Library Aspose.Words for C++