Aspose::Words::Fonts::FontFallbackSettings::Save method
Contents
[
Hide
]FontFallbackSettings::Save(const System::SharedPtr<System::IO::Stream>&) method
Saves the current fallback settings to stream.
void Aspose::Words::Fonts::FontFallbackSettings::Save(const System::SharedPtr<System::IO::Stream> &outputStream)
| Parameter | Type | Description |
|---|---|---|
| outputStream | const System::SharedPtr<System::IO::Stream>& | Output stream. |
Examples
Shows how to load and save font fallback settings to/from a stream.
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Rendering.docx");
// Load an XML document that defines a set of font fallback settings.
{
auto fontFallbackStream = System::MakeObject<System::IO::FileStream>(get_MyDir() + u"Font fallback rules.xml", System::IO::FileMode::Open);
auto fontSettings = System::MakeObject<Aspose::Words::Fonts::FontSettings>();
fontSettings->get_FallbackSettings()->Load(fontFallbackStream);
doc->set_FontSettings(fontSettings);
}
doc->Save(get_ArtifactsDir() + u"FontSettings.LoadFontFallbackSettingsFromStream.pdf");
// Use a stream to save our document's current font fallback settings as an XML document.
{
auto fontFallbackStream = System::MakeObject<System::IO::FileStream>(get_ArtifactsDir() + u"FallbackSettings.xml", System::IO::FileMode::Create);
doc->get_FontSettings()->get_FallbackSettings()->Save(fontFallbackStream);
}
See Also
- Class FontFallbackSettings
- Namespace Aspose::Words::Fonts
- Library Aspose.Words for C++
FontFallbackSettings::Save(const System::String&) method
Saves the current fallback settings to file.
void Aspose::Words::Fonts::FontFallbackSettings::Save(const System::String &fileName)
| Parameter | Type | Description |
|---|---|---|
| fileName | const System::String& | Output file name. |
Examples
Shows how to load and save font fallback settings to/from an XML document in the local file system.
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Rendering.docx");
// Load an XML document that defines a set of font fallback settings.
auto fontSettings = System::MakeObject<Aspose::Words::Fonts::FontSettings>();
fontSettings->get_FallbackSettings()->Load(get_MyDir() + u"Font fallback rules.xml");
doc->set_FontSettings(fontSettings);
doc->Save(get_ArtifactsDir() + u"FontSettings.LoadFontFallbackSettingsFromFile.pdf");
// Save our document's current font fallback settings as an XML document.
doc->get_FontSettings()->get_FallbackSettings()->Save(get_ArtifactsDir() + u"FallbackSettings.xml");
See Also
- Class FontFallbackSettings
- Namespace Aspose::Words::Fonts
- Library Aspose.Words for C++
FontFallbackSettings::Save(std::basic_ostream<CharType, Traits>&) method
template<typename CharType,typename Traits> void Aspose::Words::Fonts::FontFallbackSettings::Save(std::basic_ostream<CharType, Traits> &outputStream)
See Also
- Class FontFallbackSettings
- Namespace Aspose::Words::Fonts
- Library Aspose.Words for C++